- Install gort
- Download the appropriate binary for your system and architecture http://gort.io/documentation/getting_started/downloads/
- Extract the zip file and navigate to the directory with a terminal
- Install arduino dependencies and flash firmata
- Make sure you are running your terminal as an Administrator
$ ./gort arduino install
- reload your env variables, or close your cmd prompt and open a new one
$ ./gort scan serial
- Take note of the COM port listed, this should be your arduino
$ ./gort arduino upload firmata [COM port]
- This accepts the COM port which you retrieved from the
gort scan serial
command - Your arduino will be flashed with the firmata sketch
- This accepts the COM port which you retrieved from the
- Control arduino from Gobot
$ go get -u github.com/hybridgroup/gobot && go install github.com/hybridgroup/gobot/platforms/firmata
- Use the example located here
- Replace the line
"/dev/ttyACM0"
with"COMX"
whereX
is the appropriate COM port for your arduino - Now you can execute your Gobot program with
$ go run firmata_blink.go
- You should now see the build in led start to flash!