Hot answers tagged

70 votes
Accepted

What do the LEDs on the B+ mean?

I believe the following is correct for the B+. Red PWR LED on if power OK flashes (or goes out) if the power drops below about 4.63V Green ACT LED steady on if no SD card during boot irregular ...
user avatar
  • 66.3k
29 votes
Accepted

Why are some GPIO pins HIGH when the Raspberry Pi boots up?

At powerup the GPIOs are pulled either high or low through the internal resistors. Whether the pull is high or low for a particular GPIO is detailed on page 102 of BCM2835 ARM Peripherals. As the ...
user avatar
  • 66.3k
17 votes

What do system LEDs signify?

Current RPi models have some of the following LEDs: PWR (red) Indicates that power has been provided to the board. On A+ and later models it will flash if the voltage drops below 4.63V ACT (green) ...
user avatar
12 votes

Why are some GPIO pins HIGH when the Raspberry Pi boots up?

When the Raspberry Pi boots the GPIO lines are reset to the chip default, then the OS is loaded and resets them to the OS default. There is no way to "remember" the settings across a reboot. See also ...
user avatar
  • 906
10 votes
Accepted

Are there other act_led_trigger options besides "mmc" and "heartbeat"?

I have tried describing the values mentioned. none No trigger kbd-scrolllock Keyboard scroll lock kbd-numlock Keyboard num lock kbd-capslock Keyboard caps lock kbd-...
user avatar
  • 395
10 votes
Accepted

Power LED from 3.3V Power Pin without Resistor

You need to consider that the forward voltage of a white LED is likely in the range of 3.0 V to 3.2 V (according to the linked article). Assuming the best case of 3.0 V and a resistor of 330 Ohms and ...
user avatar
  • 15.5k
9 votes
Accepted

Why does sudo not work in this case?

The shell interprets and handles redirection before the command is executed. So the redirection (>/sys/class/leds/led0/trigger) is attempted with the user's permissions, thus fails. The generally ...
user avatar
  • 1,056
9 votes

2nd LED not working when connected to different GPIO port

LEDs have different characteristics depending on their color. Of significance is the so called forward voltage. Blue LEDs have a typical forward voltage of 3.3V to 3.4V which is higher than the ...
user avatar
  • 15.5k
9 votes

Is there any built in LED connected with GPIO pin?

Yes, it is possible to control the built-in leds. Green LED is easier. According to here, though it is probably Pi 3 specific, since it didn't work for my Pi 4: In the terminal: sudo echo 1 > ...
user avatar
  • 1,574
8 votes
Accepted

Disable LEDs Pi Zero

Add the following to /boot/config.txt and reboot. dtparam=act_led_trigger=none The LED is wired with inverse logic. Write 1 to GPIO 47 to switch it off. Write 0 to GPIO 47 to switch it on.
user avatar
  • 66.3k
8 votes

I can't get three LED lights to turn off and on in an order

You need to set the pin as an output before you use it. To do that add the following line: GPIO.setup(red, GPIO.OUT) below the matching lines for green and yellow: GPIO.setup(yellow, GPIO.OUT) ...
user avatar
7 votes

How do I control the system LEDs using my software?

I can confirm that with the Raspberry Pi 2 it's possible to control the PWD LED as well! The power LED is controlled by the files in: /sys/class/leds/led1 You can turn it off just like the Status ...
user avatar
  • 171
7 votes

How do I control the system LEDs using my software?

There is a simpler way to control the LAN LEDs from userland. Source code is available from http://www.raspberrypi.org/forums/viewtopic.php?f=63&t=72070 The program needs to be run with sudo.
user avatar
  • 66.3k
7 votes

How do I control the system LEDs using my software?

I wrote a userspace program which let you control the Ethernet LEDs. The program requires the more recent libusb-1.0 (NOT the older 0.1). It works with LAN9512 (e.g. on the older Raspberry B) as well ...
user avatar
  • 71
7 votes
Accepted

Which addressable RGB LED strips are beginner friendly and Raspberry Pi friendly?

You're better off with the APA102. Because they have a separate clock pin, the timing is much less critical; the Pi can setup the new data (pin 1), then clock that data in (pin 2). Then repeat. At its ...
user avatar
  • 178
7 votes
Accepted

Using jumper cables to turn on LEDs

Looking at your picture, why not make use of the extra 10 unused rows on your breadboard? I am going to assume that you've figured out that "row 1, holes a-e" are all interconnected, "row 1, holes f-j"...
user avatar
  • 206
7 votes
Accepted

What is the maximum number of RGB LEDs that can be controlled individually?

Actually, with 17 GPIOs you can drive 72 LEDs using time multiplex (8 groups of 9 LEDs are driven one after another for such a short time that our eyes believes they are on at the same time, just less ...
user avatar
  • 230
7 votes

Is there any built in LED connected with GPIO pin?

though it is probably Pi 3 specific, since it didn't work for my Pi 4 It works on the 4 as well, you just need to set the right trigger. The instructions that you provided are not applicable to the 4 ...
user avatar
6 votes

How can I turn the lights off on my pi?

There is answer in How do I control the system LEDs using my software? For Power led, if you have RPI 2, then you can turn it off by using echo 0 > /sys/class/leds/led1/brightness # Power LED ...
user avatar
6 votes

how to turn on and off an led with only a tactile button

You can also use interrupts, which are quite useful in many other settings as well. This way, you can have your script do other things while you play with the button and the LED. import RPi.GPIO as ...
user avatar
6 votes

Why does sudo not work in this case?

As explained by lornix it's because the shell handles redirection before the command is executed. I prefer this type of invocation sudo sh -c "echo 4 >/sys/class/gpio/export" In your case sudo ...
user avatar
  • 66.3k
6 votes

Driving LED stripes as non-root user

@vertikalist - I'm the developer of BiblioPixel :) Instead of the sudoers method stated in the other answer (which is still kind of user superuser permissions), I recommend just adding SPI access to ...
user avatar
6 votes
Accepted

How to blink LEDs on/off continually, while continuing execution of a script?

Thanks to @user451777 for the tip on threading. I modified the Signaling Between Threads script and came up with the following: import threading, time from random import randint def flashLed(e, t): ...
user avatar
6 votes
Accepted

Help lighting LED via GPIO pins

In your script, you have: GPIO.setup(7, GPIO.OUT) and then you call blink(11), which will lead to calling: GPIO.output(11, GPIO.HIGH) That is, the pin numbers don't match. You want to change both ...
user avatar
  • 531
6 votes

Using jumper cables to turn on LEDs

Using a bread-board is usually a temporary means of allowing you to work out the circuit you want before transferring the design to Veroboard or just for something that you only need for a short while....
user avatar
  • 3,583
6 votes
Accepted

I need to control 8 LED's but I can only control 3? [helpful pictures attached]

The problem is the breadboard (though some would call it a feature). The breadboard you have has split power rails (Marked by the red and blue lines on the edge of the board). If you look carefully ...
user avatar
6 votes
Accepted

How to indicate read / write disk operiation via LEDs connected to GPIO

Have a look at /proc/diskstats. It shows a lot of details per partition. Monitor for changes and light up an LED connected to the GPIO. You could even whip up a script and monitor multiple individual ...
user avatar
  • 7,008
6 votes
Accepted

connecting common anode rgb led

Connect the common anode pin to 3.3 volt and each of the other pins to a GPIO (add a current limiting resistor between the LED and the GPIO pin. To Light one of the colors set the corresponding GPIO ...
user avatar
5 votes

How do I control the system LEDs using my software?

With the Pi 2, you can control both the red and green onboard LED's. The Windows 10 IoT documentation lists the red power LED and the green Ok LED on GPIO 35 and 47, respectively. https://ms-iot....
user avatar
  • 151
5 votes
Accepted

Is my Pi's GPIO damaged?

If you have wiringPi installed try its pin test utility with nothing connected to the gpios. Alternatively download and install my pigpio library and run the gpio test shell script (again with ...
user avatar
  • 66.3k

Only top scored, non community-wiki answers of a minimum length are eligible