1

I'm wondering if it's possible to use the pi pins directly to toggle a led programmatically.

I don't have a GPIO board. Is it possible to connect the led to the pins and control it from the code?

1 Answer 1

5

Yes, You can connect LEDs directly to Pi's pins. The Pi has many GPIOs on the header and you can use any one of them and connect an LED on a breadboard.

Here is one very well explained tutorial for the same:- Click Here

Here is reference image about LED Connection.

enter image description here

12
  • The problem is that I don't have a breadboard. Let's assume I only have the Raspberry Pi accessible via wifi and an LED. Is it possible to turn on/off the LED this way? Commented Aug 4, 2016 at 4:19
  • Which Raspberry Pi model you have? Without connecting LED how can you turn ON LED?
    – HallMark
    Commented Aug 4, 2016 at 4:42
  • I have a Raspberry PI 2 B+. I don't have that kind of board with many holes in it, but I would like to use the pins from Raspberry Pi directly. Isn't that possible? How can I connect the LED to them? Commented Aug 4, 2016 at 4:49
  • That board helps you to avoid any false short circuit when connecting and if you really not want to use that one then get wires and connect same connection manually without board.
    – HallMark
    Commented Aug 4, 2016 at 4:57
  • I have updated answer with LED Connection image you can connect something like that.
    – HallMark
    Commented Aug 4, 2016 at 5:02

Your Answer

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

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