Page 1 of 1
External activity led on Rpi Zero
Posted: Fri Jul 29, 2016 9:30 am
by day
Hi all,
I was wondering how easy would it be (and simply, "how?") to add an "external" activity led on the Rpi Zero ?
Any idea on how to do that ?
Is this up to date for the Pi Zero :
http://elinux.org/Assign_GPIO_as_ACT-led ?
I would need to do all the steps ?
Thanks for any help
day
Re: External activity led on Rpi Zero
Posted: Sat Sep 03, 2016 6:45 pm
by Zero
Maybe de-soldering the one on the board and extending some leads to wherever you want it is an option?
Re: External activity led on Rpi Zero
Posted: Thu Nov 24, 2016 12:46 pm
by Tango
Take a look at Device Tree Overlays, you can assign the ext_act (activity led) to any GPIO.
Dale
ext_act_led: act {
label = "ext_act";
linux,default-trigger = "mmc";
gpios = <&gpio 19 0>;
Re: External activity led on Rpi Zero
Posted: Fri Nov 25, 2016 4:41 am
by day
so after a quick search on @Tango's help (THANKS !!), here is the exact step to do (
to test, didn't do it yet) :
1- create a deportedactivityled.dts file with this in it :
Code: Select all
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2708";
fragment@0 {
target = <&leds>;
__overlay__ {
/*
* External LED to show CPU activity.
* Active-high, GPIO 19
*/
ext_act_led: act {
label = "ext_act";
linux,default-trigger = "cpu0";
gpios = <&gpio 19 0>;
};
};
};
};
2- compile it with a device-tree compiler (
https://www.raspberrypi.org/documentati ... ce-tree.md)
(possible way, to test: using this compiler
https://git.kernel.org/cgit/utils/dtc/dtc.git and this command "$ dtc -O dtb -o deportedactivityled.dtb deportedactivityled.dts")
3- copy to SD card (/boot/overlays)
4- add it in config.txt: dtoverlay=deportedactivityled.dtb
5- wire your led on GPIO 19 (or else change it as well in above code) (use this to get the resistor value needed :
http://led.linear1.org/1led.wiz)
6- profit
Re: External activity led on Rpi Zero
Posted: Sat Nov 26, 2016 4:42 am
by Tango
Change cpu0 to mmc0 to use the SD card to trigger the LED instead of the CPU.
Dale
Re: External activity led on Rpi Zero
Posted: Sat Feb 11, 2017 4:57 am
by Mr_Nick666
EDIT:
When the CPU is doing it's bit my LED flashes away like a goodun now!
On the Pi3B I only needed to add this code to the boot/ config file and it works a charm!
On earlier Pis I believe it's even shorter
Just thought I'd share as there's been many nights of head scratching to find a very simple answer!
Nick