Skip to content

Instantly share code, notes, and snippets.

@julianshen
Created December 9, 2013 01:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julianshen/7865955 to your computer and use it in GitHub Desktop.
Save julianshen/7865955 to your computer and use it in GitHub Desktop.
package main
import (
spark "github.com/julianshen/SparkGo"
"time"
)
func main() {
core := spark.SparkCore{"YOUR_ACCESS_TOKEN","DEVICE_ID"}
c := time.Tick(1 * time.Second)
b := true
for _ = range c {
core.DigitalWrite("D7", b)
b=!b
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment