hybridgroup.gobot/platforms/firmata
Adrian Zankich 52e3ffc735 Rename test helpers so they don't impact coverage 2014-12-18 14:07:48 -08:00
..
LICENSE WIP project restructure 2014-04-29 13:20:32 -07: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
firmata.go Update firmata package for new gpio interface 2014-11-19 11:18:48 -08:00
firmata_adaptor.go Enforce I2c interface 2014-11-29 12:14:36 -08:00
firmata_adaptor_test.go Rename test helpers so they don't impact coverage 2014-12-18 14:07:48 -08:00
firmata_test.go Rename test helpers so they don't impact coverage 2014-12-18 14:07:48 -08:00

README.md

Firmata

Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists and anyone interested in creating interactive objects or environments.

This package provides the adaptor for microcontrollers such as Arduino that support the Firmata protocol

For more info about the arduino platform click here.

How to Install

go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/gobot/platforms/firmata

How to Use

package main

import (
	"time"

	"github.com/hybridgroup/gobot"
	"github.com/hybridgroup/gobot/platforms/firmata"
	"github.com/hybridgroup/gobot/platforms/gpio"
)

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

	firmataAdaptor := firmata.NewFirmataAdaptor("arduino", "/dev/ttyACM0")
	led := gpio.NewLedDriver(firmataAdaptor, "led", "13")

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

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

	gbot.AddRobot(robot)

	gbot.Start()
}

Hardware Support

The following firmata devices have been tested and are currently supported:

More devices are coming soon...