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.setup(18, GPIO.OUT)


Actually now i'm getting 0.20V

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

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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