hybridgroup.gobot/platforms/dragonboard
deadprogram d225a1e5e4 i2c: refactor i2c interface definitions out of sysfs into i2c package
Signed-off-by: deadprogram <ron@hybridgroup.com>
2017-07-26 19:07:40 +02:00
..
LICENSE Add license/readme (not complete) 2017-02-23 20:18:21 +10:00
README.md docs: improve explanations for scp/ssh workflow on SoC boards to README 2017-04-12 15:42:06 +02:00
doc.go Clean up, fixed tests. 2017-02-24 01:54:13 +10:00
dragonboard_adaptor.go i2c: refactor i2c interface definitions out of sysfs into i2c package 2017-07-26 19:07:40 +02:00
dragonboard_adaptor_test.go dragonboard: increase test coverage 2017-04-29 12:43:55 +02:00

README.md

DragonBoard™ 410c

The DragonBoard 410c, a product of Arrow Electronics, is the development board based on the mid-tier Qualcomm® Snapdragon™ 410E processor. It features advanced processing power, Wi-Fi, Bluetooth connectivity, and GPS, all packed into a board the size of a credit card.

How to Install

Make sure you are using the latest Linaro Debian image. Both AArch32 and AArch64 work™ though you should stick to 64bit as OS internals may be different and aren't tested.

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 DragonBoard and run the program on the DragonBoard itself as documented here.

go get -d -u gobot.io/x/gobot/...

How to Use

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

package main

import (
    "fmt"

    "gobot.io/x/gobot"
    "gobot.io/x/gobot/drivers/gpio"
    "gobot.io/x/gobot/platforms/dragonboard"
)

func main() {
    dragonAdaptor := dragonboard.NewAdaptor()
    button := gpio.NewButtonDriver(dragonAdaptor, "GPIO_A")

    work := func() {
        gobot.On(button.Event("push"), func(data interface{}) {
            fmt.Println("button pressed")
        })

        gobot.On(button.Event("release"), func(data interface{}) {
            fmt.Println("button released")
        })
    }

    robot := gobot.NewRobot("buttonBot",
        []gobot.Connection{chipAdaptor},
        []gobot.Device{button},
        work,
    )

    robot.Start()
}

How to Connect

Compiling

Compile your Gobot program on your workstation like this:

$ GOARCH=arm64 GOOS=linux go build examples/dragon_button.go

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

$ scp dragon_button root@192.168.1.xx:
$ ssh -t root@192.168.1.xx "./dragon_button"