hybridgroup.gobot/platforms/intel-iot/edison
Adrian Zankich 5cdba38e95 Increase edison test coverage 2014-12-19 10:54:54 -08:00
..
README.md update readmes for import script 2014-12-12 10:32:52 -08:00
doc.go Update docs 2014-10-28 14:52:59 -07:00
edison_adaptor.go Enforce I2c interface 2014-11-29 12:14:36 -08:00
edison_adaptor_test.go Increase edison test coverage 2014-12-19 10:54:54 -08:00
pwm_pin.go Update edison package for new gpio interface 2014-11-19 11:53:05 -08:00

README.md

Edison

The Intel Edison is a wifi and Bluetooth® enabled devolopment platform for the Internet of Things. It packs a robust set of features into its small size and supports a broad spectrum of I/O and software support.

For more info about the Edison platform click here.

How to Install

First you must install the appropriate Go packages

go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/gobot/platforms/intel-iot/edison

Setting up your Intel Edison

Everything you need to get started with the Edison is in the Intel Getting Started Guide located here. Don't forget to configure your Edison's wifi connection and flash your Edison with the latest firmware image!

Cross compiling for the Intel Edison

You must first configure your Go environment for 386 linux cross compiling

$ cd $GOROOT/src
$ GOOS=linux GOARCH=386 ./make.bash --no-clean

Then compile your Gobot program with

$ GOARCH=386 GOOS=linux go build examples/edison_blink.go

Then you can simply upload your program over the network from your host computer to the Edison

$ scp edison_blink root@192.168.1.xxx:/home/root/

and execute it on your Edison with

$ ./edison_blink

How to Use

package main

import (
	"time"

	"github.com/hybridgroup/gobot"
	"github.com/hybridgroup/gobot/platforms/gpio"
	"github.com/hybridgroup/gobot/platforms/intel-iot/edison"
)

func main() {
	gbot := gobot.NewGobot()

	e := edison.NewEdisonAdaptor("edison")
	led := gpio.NewLedDriver(e, "led", "13")

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

	robot := gobot.NewRobot("blinkBot",
		[]gobot.Connection{e},
		[]gobot.Device{led},
		work,
	)

	gbot.AddRobot(robot)

	gbot.Start()
}

How to Connect

The Intel Edison Getting Started Guide details connection instructions for Windows, Mac and Linux.