This is the Adaptor for the PocketBeagle, a USB-key-fob sized computer. The PocketBeagle is based on the BeagleBone Black/Green, but has a different pin layout and somewhat different capabilities.

For more info about the PocketBeagle platform go to

API Reference

How to Install

We recommend updating to the latest Debian OS when using the BeagleBone. The current Gobot only supports 4.x versions of the OS. If you need support for older versions of the OS, you will need to use Gobot v1.4.

You would normally install Go and Gobot on your workstation. Once installed, cross compile your program on your workstation, transfer the final executable to your BeagleBone, and run the program on the BeagleBone itself as documented here.

go get -d -u

How to Use

The pin numbering used by your Gobot program should match the way your board is labeled right on the board itself.

Gobot also has support for the four built-in LEDs on the PcoketBeagle, by referring to them as usr0, usr1, usr2, and usr3.

To use the PocketBeagle, use beaglebone.NewPocketBeagleAdaptor() like this:

package main

import (


func main() {
        beagleboneAdaptor := beaglebone.NewPocketBeagleAdaptor()
        led := gpio.NewLedDriver(beagleboneAdaptor, "P1_2")

        work := func() {
                gobot.Every(1*time.Second, func() {

        robot := gobot.NewRobot("pocketBeagleBot",


How to Connect


Compile your Gobot program on your workstation like this:

$ GOARM=7 GOARCH=arm GOOS=linux go build examples/beaglebone_blink.go

Once you have compiled your code, you can you can upload your program and execute it on the BeagleBone from your workstation using the scp and ssh commands like this:

$ scp beaglebone_blink [email protected]:/home/debian/
$ ssh -t [email protected] "./beaglebone_blink"

In order to run the preceeding commands, you must be running the official Debian Linux through the usb->ethernet connection, or be connected to the board using WiFi.

You must also configure hardware settings as described below.

Updating your board to the latest OS

We recommend updating your BeagleBone to the latest Debian OS. It is very easy to do this using the Etcher ( utility program.

First, download the latest BeagleBone OS from

Now, use Etcher to create an SD card with the OS image you have downloaded.

Once you have created the SD card, boot your BeagleBone using the new image as follows:

  • Insert SD card into your (powered-down) board, hold down the USER/BOOT button (if using Black) and apply power, either by the USB cable or 5V adapter.

  • If all you want to do it boot once from the SD card, it should now be booting.

  • If using BeagleBone Black and desire to write the image to your on-board eMMC, you'll need to follow the instructions at When the flashing is complete, all 4 USRx LEDs will be steady on or off. The latest Debian flasher images automatically power down the board upon completion. This can take up to 45 minutes. Power-down your board, remove the SD card and apply power again to be complete.

These instructions come from the Beagleboard web site's "Getting Started" page located here:

Configure hardware settings

In order to enable the various hardware devices on your BeagleBone or PocketBeagle, you need to configure a special file named /boot/uEnv.txt.

This file controls all of the different hardware options used at startup time, so you can enable or disable features based on your specific needs. You only need to do this once, and then the settings will apply each time you start up your BeagleBone.

First connect to the BeagleBone using ssh:

ssh [email protected]

Once you are connected to the BeagleBone, edit the /boot/uEnv.txt file like this:

sudo nano /boot/uEnv.txt

To enable GPIO, PWM, I2C, and SPI, modify the ##Example v4.1.x section to add a line to enable the cape manager:

##Example v4.1.x

Save the file, then reboot your BeagleBone.

You will now be able to run your Gobot programs to control the various hardware.


All Gobot digital GPIO, AIO, I2C, and SPI drivers listed below should work with the PocketBeagle: