I'm going to turn on/off an LED via pin1# (3v3) & GND. My current code is something like this:




But it won't turn off by the last line. Anyone can find a clue?


You can only control the voltage of pins connected to GPIO.

Pin 1 is connected to the 3V3 rail and is NOT a GPIO.

GPIO 1 is connected to pin 28 on the Pi models with the 40 pin expansion header.

| improve this answer | |
  • Thanks a million for your response. Is it possible to change the current of pins connected to GPIO? – Emad Firooze Feb 14 '18 at 18:20
  • Not to any significant extent. The GPIO can be set to low (0V) or high (3V3). Generally they can source or sink about 16 milliamps. They are intended to drive logic circuitry and very low power devices like LEDs. – joan Feb 14 '18 at 18:36

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.