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 flashes for SD card access
Ethernet Socket Left LED (yellow)
on 100-Mbps connection
off 10-Mbps connection
Ethernet Socket Right LED (green)
on if link ...
The OK LED can be controlled from user space software. Details here: Re: Can we control the on-board leds
Summarised from the above (all credit to BrianW):
The OK LED is available as /sys/class/leds/led0/.
The kernel LED driver has "triggers" which let some other part of the kernel control the LED. The default trigger for the LED is 'mmc0', which makes it ...
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 Linux kernel is started and if device tree is enabled (likely) then it will reconfigure the GPIOs according to the device tree settings. Modules loaded from /etc/...
None of the on board LEDs can be controlled in software - they are all used for other things.
OK - indicates SD card access
PWR - indicates power to the micro USB connection
FDX - Full Duplex LAN
LNK - LAN Activity
10M - 10M/100M connection speed - if it is lit, the RPi is connected at 100M.
Now, that's the official answer... Let's study the schematic.
You need (as minimum):
~470 ohm resistor (1 per LED) - note that this resistance is approximate, but should work for most all standard 5mm LEDs
Pi-breadboard connector (hacked 26-pin floppy drive cable, Pi breakout kit, etc).
Your circuit will look like the following (image taken from the excellent book Raspberry Pi: ...
What you are looking for in that case is a LED matrix. You could control this matrix from the GPIO pins, but that still limits the amount of LEDs you can connect (the size of the matrix) and it might also start to draw too much current if you're not careful.
A better option is to connect a LED matrix to the I2C bus, using one or multiple I2C I/O extenders. ...
You can connect directly to the IO pins. The GPIO pins on the RasPi processor (BCM2835) supply 3.3v @8ma of drive by default but are programmable as far as pull-up, current, slew rate, etc. see http://www.scribd.com/doc/101830961/GPIO-Pads-Control2 for a summary.
Having said that, unless you're adept at programming those pin parameters, you probably want ...
The Pi does not have any onboard speaker, so there are no power on/off sounds. The main indicators are the lights on the front corner of the board. These are:
OK (green): The board is active (blinks off when accessing the SD card)
PWR (red): The board is successfully powered from USB
FDX (green): Network is full-duplex
LNK (green): The network cable is ...
Current RPi models have some of the following LEDs:
Indicates that power has been provided to the board. On A+ and later models it will flash if the voltage drops below 4.63V
Indicates SD card activity: flashes when read or write is in progress, otherwise steady ON (on Pi Zero) or OFF. Should flash intensively during boot. This is ...
Arduino: is a microcontroller based physical computing platform,programmed using a Wiring-based language (syntax and libraries), similar to C++ with some slight simplifications and modifications, and a Processing-based integrated development environment. With the Arduino Uno you would need to create a sketch in the Arduino language. This is not hard - it ...
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 What is the power on state of the GPIOs? and GPIO state after boot.
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 using Ohm's law R = U / I we find that the current is about 1 mA and thus the brightness of the LED is rather low. Decreasing the resistor will help to some ...
You can do this with the PWM pin on the Pi.
Here's a link to a blog post dealing with this that uses the C WiringPi library to do it:
I would paste the code in here but the editor isn't co-operating.
Discovered the problem:
Some guides online instruct you do download version 0.1.0 of the GPIO library which does not have the setup function. You must use a more recent version of the library.
I have downloaded version 0.5.x and it works correctly.
Download from here https://pypi.python.org/pypi/RPi.GPIO
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 voltage output of the GPIO pin. So the current through the LED will be minuscule. No current, no light. Red LEDs on the other hand have a forward voltage of less ...
I few differences I have noticed.
Doesn't support Analog IO
Not as many pins for IO as the Arduino
Much more difficult to access IO pins (imo)
Writing to the pins for time essential applications in Python can lead to inaccuracies
Runs a full fledged Linux OS
Features Ethernet (and WiFi and Bluetooth on newer models)
Two USB 2.0
Can display to ...
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 recognized solution is to use the tee command: (man page and wikipedia)
echo heartbeat | sudo tee /sys/class/leds/led0/trigger >/dev/null
The tee command ...
You need to set the pin as an output before you use it.
To do that add the following line:
below the matching lines for green and yellow:
GPIO.setup(yellow, GPIO.OUT) ## set output
You can control all leds (except PWR in older Pi models, as said in other answers).
But for ethernet leds you will need to patch the driver and recompile the kernel.
Information of how recompile can get here: http://elinux.org/RPi_Kernel_Compilation
Patch and more information here(google translate if need): http://everpi.tsar.in/2013/11/patch-para-...
You can connect an LED directly to the GPIO pins (it will provide enough current).
However, you probably shouldn't do this for a couple of reasons, You can fry the Pi as you state, and without a current limiting resistor you will signifcantly reduce the life of the LED. This does not mean you need to buy a breakout board to run a single LED. You can use a ...
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 own speed.... I'm not sure how quick a Raspberry Pi can alter its GPIO pins... But at least it would work.
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" are interconnected, "row 2, holes a-e" are interconnected, etc. Your unused rows 21-30 aren't used, so, for example, the anode of the left-hand blue LED is ...
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 bright). Do you can have 24 RGB LEDs this way.
And if that's not enough, you can cascade I2C LED drivers resulting in hundreds of LEDs if you want.
Yes. You would use the GPIO pins in PWM mode to control each brightness scale. An example of the wiring from wiring.org.co.
The GPIO utility & guides from Gordons Project is another place to start
As Alex Chamberlain pointed out, only one GPIO pin supports PWM. You can use software to achieve PWM on other GPIO pins. Info & examples for C &...
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:
You can turn it off just like the Status LED using:
echo 0 > /sys/class/leds/led1/brightness # Power LED
echo 0 > /sys/class/leds/led0/brightness # Status LED
See Guy's answer for more ways to ...
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 as LAN9514 chips (e.g. on Raspberry B+ or Raspberry 2)
Details can be found here: LAN951x LED control