Arduino Firmata client for golang

go-firmata

A Golang wrapper for Firmata on Arduino

GoDoc

Installation

	go get github.com/kraman/go-firmata

Usage

package main

import (
	"github.com/kraman/go-firmata"
	"time"
)

var led uint8 = 13

func main() {
	arduino, err := firmata.NewClient("COM1", 57600)
	if err != nil {
		panic(err)
	}

	// arduino.Verbose = true

	myDelay := time.Millisecond * 250

	// Set led pin as output
	arduino.SetPinMode(led, firmata.Output)

	// Blink led 10 times
	for x := 0; x < 10; x++ {
		
		// Turn ON led
		arduino.DigitalWrite(led, true)
		arduino.Delay(myDelay)
		
		// Turn OFF led
		arduino.DigitalWrite(led, false)
		arduino.Delay(myDelay)

	}
	arduino.Close()
}
Similar Resources

Geth client which picks the most profitable blocks to mine using a greedy algorithm

Greeden-Geth Greeden-Geth is a protocol-agnostic client which uses a greedy algorithm to pick the most profitable blocks to submit to the network out

Nov 16, 2022

A comparison of client tracing APIs

A comparison of client tracing APIs Client Usage Trace Dump go-ethereum View Nethermind View View Erigon View View Besu View Getting Started git clone

Feb 4, 2022

CircleCI API (V2) Client Library in Go

go-circleci This client supports the CircleCI V2 API. Installation Installation can be done with a normal go get: go get -u github.com/grezar/go-circl

Dec 12, 2022

HackerNews client made with Kyoto

HackerNews client made with Kyoto

HackerNews demo HackerNews demo client, made with kyoto Install Clone repo: git clone https://github.com/yuriizinets/kyoto-hn Go to the cloned directo

Jul 2, 2022

Go client library for Geonames Web Services (geonames.org)

geonames Go client library for Geonames Web Services (geonames.org) Usage Register your username at geonames.org Export ENV Var or read the username f

Nov 23, 2022

Graphical small-internet client for windows, linux, MacOS X and BSDs. Supports gemini, http, https, gopher, finger.

Graphical small-internet client for windows, linux, MacOS X and BSDs. Supports gemini, http, https, gopher, finger.

Graphical small-internet client for windows, linux, MacOS X and BSDs. Supports gemini, http, https, gopher, finger.

Jan 1, 2023

Gore - Simple HTTP client for Go

GoRe (Go Requester) Simple HTTP client for Go Example g := gore.New( gore.With

Jan 21, 2022

The command-line client for Cloudflare Tunnel

Cloudflare Tunnel client Contains the command-line client for Cloudflare Tunnel, a tunneling daemon that proxies traffic from the Cloudflare network t

Feb 10, 2022

Allows verifying client's phone number

hone verification module for Elling - Elytrium Billing

Jun 4, 2022
Comments
  • go-firmata package update

    go-firmata package update

    • log4go removed, now using Go's log package
      • this eliminates the dependance of hg (Mercurial)
      • reduces the need of external packages
    • tarm/goserial package changed for tarm/serial (Updated version)
    • go fmt applied
    • Stringers for PinMode modified
    • Added verbose control capability to avoid printing all the commands on-screen
    • Delay method added
    • Standarized data type for pinMode and digitalWrite (uint8)
    • Usage example added
    • Readme updated

    This work great! :P

  • Adding Close method to FirmataClient

    Adding Close method to FirmataClient

    It's a good idea to be able to close the serial port when we are done with it. This allows us to attach a new instance of the FirmataClient to the same serial port if we need to.

Go library for hardware I/O control, in the programming style of Arduino

hwio Introduction hwio is a Go library for interfacing with hardware I/O, particularly on SoC-based boards such as BeagleBone Black, Raspberry Pi and

Dec 9, 2022
Chief Client Go is a cross platform Krunker client written in Go Lang

Chief Client Go Chief Client Go is a client for Mac and Linux written in GoLang Features Ad Blocker Option to use proxy Installation To install this c

Nov 6, 2021
a Go (Golang) MusicBrainz WS2 client library - work in progress
a Go (Golang) MusicBrainz WS2 client library - work in progress

gomusicbrainz a Go (Golang) MusicBrainz WS2 client library - a work in progress. Current state Currently GoMusicBrainz provides methods to perform sea

Sep 28, 2022
Golang exaroton API client

Golang exaroton API client This is the unofficial Go implementation of this I'm still learning so expect badly design code PR are appreciated. Code In

Dec 14, 2021
Selenium WebDriver client for Go

============================================== go-selenium - Selenium WebDriver client for Go go-selenium is a Selenium WebDriver client for Go. Note:

Dec 10, 2022
Yubigo is a Yubikey client API library that provides an easy way to integrate the Yubico Yubikey into your existing Go-based user authentication infrastructure.

yubigo Yubigo is a Yubikey client API library that provides an easy way to integrate the Yubikey into any Go application. Installation Installation is

Oct 27, 2022
Simple Client Implementation of WebFinger

Go-Webfinger Go client for the Webfinger protocol Go-Webfinger is a Go client for the Webfinger protocol. *It is a work in progress, the API is not fr

Nov 18, 2022
An example client implementation written in GO to access the CyberVox platform API

About This is an example client implementation written in GO to access the CyberVox platform API.

Nov 7, 2022
TUI Client for Docker
TUI Client for Docker

docui - TUI Client for Docker Written in Go About docui docui is a TUI Client for Docker. It can do the following: image search/pull/remove save/impor

Dec 28, 2022
Elastic is an Elasticsearch client for the Go programming language.

Elastic is an Elasticsearch client for the Go programming language.

Jan 9, 2023