hybridgroup.gobot/platforms/firmata
Adrian Zankich 129bb7041a Fix firmata tests 2014-07-10 14:28:54 -07:00
..
LICENSE
README.md
firmata.go
firmata_adaptor.go
firmata_adaptor_test.go Fix firmata tests 2014-07-10 14:28:54 -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/gobot/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...