Ok, first I’m not an EE, so if I make a statement that’s obviously wrong from that perspective. . .
Anyway . . . I have a custom cape with several LED’s on it here. Connected to a Beagelbone green.
LED is on:
william@beaglebone:~$ cat /sys/class/gpio/gpio110/value
1
LED goes off:
william@beaglebone:~$ sudo sh -c “echo ‘0’ > /sys/class/gpio/gpio110/value”
william@beaglebone:~$ cat /sys/class/gpio/gpio110/value
0
LED comes back on:
william@beaglebone:~$ sudo sh -c “echo ‘1’ > /sys/class/gpio/gpio110/value”
unexport does not work for me:
william@beaglebone:~$ sudo sh -c “echo ‘110’ > /sys/class/gpio/unexport”
sh: echo: I/O error
Maybe I’m doing this wrong, because honestly I have not been using the sysfs gpio file directly in around . . .I do not know, maybe 6 months. I’ve been using config-pin with universal IO. But it is my assumption that I am unable to unexport because of something related to universal IO, and my custom cape / overlay.
But yes, the pins on a beaglebone are all set to come up as inputs by default. Then they can be used as gpio without any overlay, just by exporting the pins, then configurering them the way you want. Through the sysfs gpio file structure.
So why don’t you copy paste what you’re attempting from the command line, along with the errors you’re getting if any. If you’re not getting any errors, but no physical feedback through the LED going off and on. Then you’re probably connected to the wrong pin out of the header.
Another thing that comes to mind, is that possibly your circuit there is reverse logic.
By the way, I have the book, but this is not an issue with Derrek’s book, I know that for a fact. You’re doing something differently, or wrong for your situation. Maybe something has changed, but you’re most likely using a 3.8.11-bone47 kernel. Which should be exactly the same kernel Derek was using.