0

Okay so I ran the following code and I am seeing ~0.70V on the GPIO pin and not 3.3V. Why could that be?

#import the GPIO and time package
import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)
GPIO.output(18,True)

GPIO.cleanup()

Actually now i'm getting 0.20V

  • keep looping, no clean up. – tlfong01 Jun 24 at 3:19
0

This code will set the output Low for about 1 microsecond then reconfigure it as an INPUT.

So depending on what is connected this is expected.

If you want the state to persist remove the call to cleanup.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.