Download your favorite Linux distribution at LQ ISO.
Go Back > Blogs > Musings on technology, philosophy, and life in the corporate world
User Name


Hi. I'm a Unix Administrator, mathematics enthusiast, and amateur philosopher. This is where I rant about that which upsets me, laugh about that which amuses me, and jabber about that which holds my interest most: Unix.
Rate this Entry

blinky blinky blinky

Posted 05-15-2014 at 01:31 AM by rocket357

Bought a beaglebone black.

And a bunch of LEDs, resistors, jumpers and a breadboard. Time for a little fun.

Installed OpenBSD-5.5 on the beaglebone (tried running CURRENT...ouch. Compiling on this thing hurts because the sd card is so incredibly slow...probably my fault, as I used a cheap class 4 micro sd...).

Wired up a simple circuit and started gpioctl'ing pins. Hrmmm. Nothing works. Perform OpenBSD-project problem remediation:

1) read man page for gpioctl
2) /facepalm...gpio pins can't be altered in securelevel > 0 if they aren't already configured. I'm running securelevel 1 (the default).

Set the system to boot to securelevel -1 (yeah, overkill). Reboot.

gpioctl gpio0 0 toggle


Hrmm. I bet the pins are not mapped 1:1. I'll just have to brute force it:

for c in 0 1 2 3; do echo "gpio$c"; for p in `jot 32 0`; do gpioctl gpio$c $p toggle; sleep 1; gpioctl gpio$c $p toggle; done; done

Interesting. GPIO_7 is 7. /facepalm

Let's run a little test.

gpioctl gpio0 30 toggle

LED comes on. And it's wired up to GPIO_30.

Imagine that...this must be the principle of least astonishment in action. I've made this problem harder than it has to be. Put gpioctl commands in /etc/rc.securelevel to configure a few pins...reboot to securelevel 1.

5 minutes later: LEDs flashing, buzzer going off, having a good ol' time making circuits to interact with the "real world".

My wife asked for dancing Christmas lights years ago. I do believe this year her wish will come true.
Posted in Uncategorized
Views 689 Comments 2
« Prev     Main     Next »
Total Comments 2


  1. Old Comment
    I'm tempted to get a BeagleBone Black. I've got two Raspberry Pis, and an Arduino Uno. Plus a breadboard, wires, and assorted electronic doodahs. Haven't done anything useful with them yet, though.
    Posted 05-15-2014 at 05:36 AM by brianL brianL is offline
  2. Old Comment
    My sole reasoning for selecting the BBB is that the rPi isn't OpenBSD-friendly (GPU driver is not open source). I'm considering getting an Arduino as well, but I haven't yet. It's definitely fun stuff =)
    Posted 05-15-2014 at 01:32 PM by rocket357 rocket357 is offline


All times are GMT -5. The time now is 02:48 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration