bonescript DigitalWrite error: Unable to write to /sys/class/gpio/gpio60/value

12 views
Skip to first unread message

in...@fabianalthaus.de

unread,
Dec 13, 2017, 11:59:00 AM12/13/17
to BeagleBoard
Hello I am experimenting with the pocketbeagle, 
and i try to write a normal digitalWrite to a gpio pin with my node script.

i am able to get button input signals and analog read. 

Anyway when i try to use: 

b.pinMode(pin, b.OUTPUT);
b
.digitalWrite(pin, b.LOW);


i get the message:

error: Unable to write to /sys/class/gpio/gpio60/value

the pin seems to be owned by root user, is this the problem?

 1 root gpio    0 Dec 13 12:57 gpio60 -> ../../devices/platform/ocp/4804c000.gpio/gpio/gpio60

how can this be solved with a beaglescript from nodejs app?

thank you for any help! i am hitting a wall at the moment.

Dennis Lee Bieber

unread,
Dec 13, 2017, 2:33:35 PM12/13/17
to beagl...@googlegroups.com
On Wed, 13 Dec 2017 05:47:29 -0800 (PST),
in...@fabianalthaus.de declaimed the following:

>error: Unable to write to /sys/class/gpio/gpio60/value
>
>the pin seems to be owned by root user, is this the problem?
>
> 1 root gpio 0 Dec 13 12:57 gpio60 -> ../../devices/platform/ocp/
>4804c000.gpio/gpio/gpio60
>
>how can this be solved with a beaglescript from nodejs app?
>
>thank you for any help! i am hitting a wall at the moment.

Well... The brute force method is likely to run your script via sudo...
The other method... Might be to modify your user account to be a member
of the GPIO group... (Hopefully the group has full R/W access).

--
Wulfraed Dennis Lee Bieber AF6VN
wlf...@ix.netcom.com HTTP://wlfraed.home.netcom.com/

Robert Nelson

unread,
Dec 13, 2017, 2:38:52 PM12/13/17
to Beagle Board, in...@fabianalthaus.de
You should be part of the gpio group, double check via:

debian@test-bbb-1:~$ cat /etc/group | grep gpio
gpio:x:995:debian

Regards,

--
Robert Nelson
https://rcn-ee.com/
Reply all
Reply to author
Forward
0 new messages