hillz Posted May 8, 2017 Posted May 8, 2017 Orange Pi Zero has two LEDs in the ethernet port and I want to control those leds for system notifications, right now I'm running OpenWrt on the OPiZ and I just need to know which file I have to trigger the LEDs. In GL.iNet router I can control the LEDs by doing echo default-on > /sys/devices/platform/leds-gpio/leds/gl-connect:green:lan/trigger But I don't know how to do that in OPiZ. Please tell me which file I have to edit in order to control the LEDs of the OPiZ
tkaiser Posted May 8, 2017 Posted May 8, 2017 Link to schematic: http://linux-sunxi.org/Orange_Pi_Zero#See_also (no idea whether the leds on the Ethernet jack are accessible the way you want but schematic is the first thing to check)
hillz Posted May 8, 2017 Author Posted May 8, 2017 35 minutes ago, tkaiser said: Link to schematic: http://linux-sunxi.org/Orange_Pi_Zero#See_also (no idea whether the leds on the Ethernet jack are accessible the way you want but schematic is the first thing to check) Sorry this isn't related to the thread but my opiz is hot, which file do I have to check to see the temperature of this board ? and is the temp in celsius or fahrenheit ?
jernej Posted May 8, 2017 Posted May 8, 2017 4 hours ago, hillz said: But I don't know how to do that in OPiZ. Short: That is not possible. Long: Pins for LAN LEDs are dedicated to only this functionality, e.g. you can't configure them as GPIO and quick look trough datasheet didn't show any register for controlling them independently.
op1tjaap Posted June 1, 2017 Posted June 1, 2017 What about just using the LED lights which are on board? Quote How to control onboard leds of Orange Pi Zero May 23, 2017 codelectron 0 Comment control, green, led, Orange PI, red, sysfs, zero The Orange Pi Zero has two onboard LED, a red one and a green one. You can control them using sysfs interface. In general you can use a sysfs interface of the gpio driver but since these two leds are reserved by the LED driver you can only use this way RED LED ON echo 1 > /sys/class/leds/red_led/brightness RED LED OFF echo 0 > /sys/class/leds/red_led/brightness GREEN LED ON echo 1 > /sys/class/leds/green_led/brightness GREEN LED OFF echo 0 > /sys/class/leds/green_led/brightness Source: http://codelectron.com/how-to-control-onboard-leds-of-orange-pi-zero/
Recommended Posts