Arduino Firmata client for golang

Overview

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()
}
You might also like...
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

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

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

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

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

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.

Gore - Simple HTTP client for Go

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

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

Allows verifying client's phone number

hone verification module for Elling - Elytrium Billing

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

    opened by argandas 3
  • 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.

    opened by graysonarts 0
Owner
Krishna Raman
Krishna Raman
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

Mark Stephens 323 Aug 7, 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

Chief Software 0 Nov 6, 2021
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

Michael Wendland 47 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

Jiternos 2 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:

Sourcegraph 358 Aug 26, 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

Geert-Johan Riemer 123 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

Antoine Imbert 17 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.

Cyberlabs AI 15 Nov 7, 2022
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

skanehira 2.3k Nov 23, 2022
Elastic is an Elasticsearch client for the Go programming language.

Elastic is an Elasticsearch client for the Go programming language.

Oliver Eilhard 7.1k Nov 23, 2022