turn on LED when BBBW is powered on

Hi everyone.

I’m BBBW user.

Could you tell me below question.

Is there a wai to turn on the GPIO Controlled LED for a few seconds as soon as the bbbw is powered on, like user leds?
and How to do it?


Yes! I’m pretty sure that the Derek Molloy’s “Exploring BeagleBone: Tools and Techniques for Building with Embedded Linux” book has the examples that you are looking for in various programming languages.

Thank you for your reply, and the book’s title!
I checked table of contents of the book.
Maybe, The Chapter 6 is that?
I have experiences to control GPIO by python, and configure the device tree’s defualt setting, write to value&direction file.
I changed the GPIO Pin setting of device tree file to out&High for the LED turn on when bbb is powered on.
But I can’t find the method to turn off the LED in a few seconds. I tried to write python script to turn off the LED, and Systemd run the service script( using the After setting is "generic-board-startup.service ).
but the timing is over 1minutes from the bbbw is powered on!
I’m looking for the information of “as soon as bbb is powered on”.
I’m not familiar with embedded Linux. In particular, I have little idea about the behavior of driver-related programs. I’m wondering if the driver’s program should do this.

2021年1月6日水曜日 22:39:14 UTC+9 iguana...@googlemail.com:

Dear All

Does anyone have any ideas?
If you have any ideas on how to add LEDs, please let me know.


2021年1月7日木曜日 10:37:31 UTC+9 ha ppay:

I think what you are looking for is a bit lower level than the Kernel since you are looking to control the LEDs at power on.
You may want to have a look at the Boot Sequence of the BBB and see if there is a place you can set this like you want. I’m not sure if you can do this from U-Boot though.

The other option is to set a cron job to turn off the LED at reboot considering you are already turning it on from the device tree. You may have to play with the timing to get it the way you want. However depending on what happens at boot, the timing could be off.


Dear Jon
Thank you for your reply, and I’m sorry I haven’t been able to reply for a long time.
In the end, I couldn’t take the time to find a way to quickly turn off the LEDs, so I decided to postpone this story.
I’m sorry I couldn’t give back the information to everyone because of this result.

2021年1月8日金曜日 14:28:07 UTC+9 jonn...@gmail.com: