OrangePi PC - second led
Hi all,Orange Pi PC
What is the second motherboardLed and how it can ON-OFF from within your own program?
(First led is only PowerON ?) I see that Armbian uses two LEDs (green and red)great:) $ sudo modprobe gpio_sunxi
$ echo "turn on red led"
$ sudo sh -c "echo 1 > /sys/class/gpio_sw/normal_led/data"
$ echo "turn off red led"
$ sudo sh -c "echo 0 > /sys/class/gpio_sw/normal_led/data"
$ echo "turn on yellow led"
$ sudo sh -c "echo 1 > /sys/class/gpio_sw/standby_led/data"
$ echo "turn off yellow led"
$ sudo sh -c "echo 0 > /sys/class/gpio_sw/standby_led/data"
Can be accesed via WiringOP ? What port number ? Edited by nopnop2002 at 2016-5-23 07:03
mariuszb replied at 2016-5-23 01:30
Can be accesed via WiringOP ? What port number ?
$ ls -l /sys/class/gpio_sw/*_led
lrwxrwxrwx 1 root root 0 Jan51970 /sys/class/gpio_sw/normal_led -> ../../devices/platform/gpio_sw.1/gpio_sw/PA15
lrwxrwxrwx 1 root root 0 Jan51970 /sys/class/gpio_sw/standby_led -> ../../devices/platform/gpio_sw.0/gpio_sw/PL10
You can't access via WiringOP
You can access only normal_led via orangepi_PC_gpio_pyH3 about OPI-PC.
https://github.com/duxingkei33/o ... OWER_STATUS_PL10.py
ok :)
BTW:
in Armbian on Orange Pi PC it loks like this:
You can deactivate trigger as follows:
echo none >/sys/class/leds/green_led/trigger
and then
echo 1 >/sys/class/leds/green_led/brightness(or red_led)
echo 0 >/sys/class/leds/green_led/brightness
or trigger eg.
echo heartbeat >/sys/class/leds/green_led/trigger
Edited by nopnop2002 at 2016-5-27 06:23
mariuszb replied at 2016-5-23 15:25
ok
BTW:
GREAT!!
By the environment of Armbian,
You can control GPIO on/off by the following command.
sudo sh -c "echo 1 > /sys/devices/platform/gpio_sw.0/gpio_sw/PA6/data"
sudo sh -c "echo 0 > /sys/devices/platform/gpio_sw.0/gpio_sw/PA6/data"
sudo sh -c "echo 1 > /sys/devices/platform/gpio_sw.1/gpio_sw/PA13/data"
sudo sh -c "echo 0 > /sys/devices/platform/gpio_sw.1/gpio_sw/PA13/data"
If there is another command in armbian, please tell me.
You can use https://github.com/zhaolei/WiringOP to control all port
eg. Bash:
# LED Pin - wiringPi pin 0 is BCM_GPIO 17.
PIN=0
gpio mode $PIN out
while true; do
gpio write $PIN 1
sleep 0.5
gpio write $PIN 0
sleep 0.5
done
eg. C:
// LED Pin - wiringPi pin 0 is BCM_GPIO 17.
#define LED 0
int main (void)
{
printf ("Raspberry Pi blink\n") ;
wiringPiSetup () ;
pinMode (LED, OUTPUT) ;
for (;;)
{
digitalWrite (LED, HIGH) ; // On
delay (500) ; // mS
digitalWrite (LED, LOW) ; // Off
delay (500) ;
}
return 0 ;
}
Edited by nopnop2002 at 2016-5-27 18:24
mariuszb replied at 2016-5-26 19:34
You can use https://github.com/zhaolei/WiringOP to control all port
eg. Bash:
I tested gpio mode and gpio write in RPI(raspbian),OPI(lobris),OPI(armbian).
Everything work fine .
This topic is becoming increasingly important as more businesses rely on accurate location-based data for growth and outreach. From my experience, using a reliable google maps data scraper can significantly streamline the process of collecting business information, especially for local lead generation campaigns. The key, however, is making sure the data is clean and regularly updated to maintain its effectiveness. Has anyone here compared different tools for data accuracy and scalability?
page:
[1]