Thang Dinh
Thang Dinh

Reputation: 137

Newbie set value of GPIO pinout

I am new to beaglebone and in very first steps of the board. I follow the instruction to turn on and off the LED connected to pin P9_1 and P9_12.

The instruction is:

echo 1 > /sys/class/gpio/gpio60/value   
echo 0 > /sys/class/gpio/gpio60/value

~bash: echo: write error: Operation not permitted.

I tried to add sudo in front of echo comment but the same error pops up. Any help?

Upvotes: 0

Views: 113

Answers (1)

De Funct
De Funct

Reputation: 495

The BBB and am335x styled boards from beagleboard.org have a set up now where you can use /sys/class/leds/* for your GPIOs.

This is also done via their Spec. they have made for using the am335x. Also...

  1. Depending on the image you have currently, dictates what exact method to use
  2. So, for instance, if you have a recent image w/ kernel 5.10.x, the above mentioned Spec. is in place.
  3. If you are using an out-of-date, no longer supported image, it may be tricky.

There are also ways to get around these ideas w/ config-pin if indeed you have an older image.

So, first. Please reply with these output prints:

a. cat /etc/dogtag

b. uname -a

That will let me better understand what you are dealing w/ currently versus what you may be able to do w/ the board.

Upvotes: 0

Related Questions