hybridgroup.gobot/platforms/firmata
Adrian Zankich aed6b39bb6 Update test formatting 2014-06-13 16:01:39 -07:00
..
LICENSE WIP project restructure 2014-04-29 13:20:32 -07:00
README.md Update READMEs for each platform 2014-06-09 19:01:53 -07:00
firmata.go Make golint happy 2014-06-10 15:16:11 -07:00
firmata_adaptor.go Make golint happy 2014-06-10 15:16:11 -07:00
firmata_adaptor_test.go Update test formatting 2014-06-13 16:01:39 -07:00

README.md

Firmata

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

Getting Started

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

Example

package main

import (
	"github.com/hybridgroup/gobot"
	"github.com/hybridgroup/gobot/platforms/firmata"
	"github.com/hybridgroup/gobot/platforms/gpio"
	"time"
)

func main() {
	gbot := gobot.NewGobot()
	adaptor := firmata.NewFirmataAdaptor("myFirmata", "/dev/ttyACM0")
	led := gpio.NewLedDriver(adaptor, "myLed", "13")
	work := func() {
		gobot.Every(1*time.Second, func() {
			led.Toggle()
		})
	}
	gbot.Robots = append(gbot.Robots,
		gobot.NewRobot("blinkBot", []gobot.Connection{adaptor}, []gobot.Device{led}, work))
	gbot.Start()
}

Hardware Support

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

More devices are coming soon...