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
External activity led on Rpi Zero
Re: External activity led on Rpi Zero
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>;
Dale
ext_act_led: act {
label = "ext_act";
linux,default-trigger = "mmc";
gpios = <&gpio 19 0>;
Re: External activity led on Rpi Zero
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 :
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
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>;
};
};
};
};
(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
-
- Posts: 1
- Joined: Sat Feb 11, 2017 4:52 am
Re: External activity led on Rpi Zero
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
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!
Code: Select all
dtoverlay=pi3-act-led,gpio=19
Code: Select all
dtparam=act_led_gpio=19
Nick
Who is online
Users browsing this forum: No registered users and 1 guest