Hi SteveDee,

This is what I am on about and after reading the link you suggested it seems that the pins should not be set at 'In' not 'Out' as they could short.

It's was just an interesting observation.



This is the GPIO pin state on boot
This is the GPIO pin state after your program has been closed


Public Sub Form_Close()
Dim siPin As Short = 31

For siPin = 0 To 31
  gpioSetMode(siPin, PI_INPUT)
Next
 
  gpioTerminate()
 
End

Using the code on the left in your program produced the above