Jason Kridner
Published

Hands-on with the PocketBeagle: A $25 Linux Computer

PocketBeagle is a tiny but powerful inexpensive keyfob-sized open source Linux computer.

BeginnerProtip7,402
Hands-on with the PocketBeagle: A $25 Linux Computer

Things used in this project

Hardware components

PocketBeagle
BeagleBoard.org PocketBeagle
×1

Story

Read more

Code

Code snippet #2

Plain text
echo out > /sys/class/gpio/gpio111/direction
while :; do
> echo 1 > /sys/class/gpio/gpio111/value; sleep 1
> echo 0 > /sys/class/gpio/gpio111/value; sleep 1
> done

Code snippet #3

Plain text
void main(void)
{
  while (1) {
    __R30 = __R30 | (1<<1); // Turn on output 1
    __delay_cycles(1);
    __R30 = __R30 & ~(1<<1); // Turn off output 1
    __delay_cycles(1);
  }
}

Code snippet #8

Plain text
# Analog input 5 (P2_35)
$ config-pin P2_35 gpio
$ echo in > /sys/class/gpio/gpio86/direction
$ cat /sys/bus/iio/devices/iio:device0/in_voltage5_raw
# Analog input 6 (P1_2)
$ config-pin P1_2 gpio
$ echo in > /sys/class/gpio/gpio87/direction
$ cat /sys/bus/iio/devices/iio:device0/in_voltage6_raw

Github

https://github.com/beagleboard/pocketbeagle

Github

https://github.com/shirriff/pru-blink

Github file

https://github.com/beagleboard/linux/blob/4.14/arch/arm/boot/dts/am335x-pocketbeagle.dts

Credits

Ken Shirriff

Posted by Jason Kridner

Comments