Skip to content

benmcclelland/gogrove

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gogrove

godoc

Go library for interacting with GrovePi

Currently only tested with GrovePi firmware version 1.3.0

See examples in example_test.go

The Rasberry Pi communicates with GrovePi over I2C. The following kernel modules are needed to support this:

  • i2c_dev
  • i2c_bcm2835

To see if the Rasberry Pi is communicating with the Grove pi, run the following:

# sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 04 -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 3e --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

You should see the "04" for the GrovePi and the "3e" and "62" for the LCD.

If these are not showing up, try reloading the i2c_bcm2835 module:

# sudo modprobe i2c_dev
# sudo rmmod i2c_bcm2835
# sudo modprobe i2c_bcm2835

This package is goroutine safe within a session

To cross compile your go app for the Rasberry Pi:

# GOOS=linux GOARCH=arm go build

Some logic within is based on the Python library available here

Useful links:

About

Go library for interacting with GrovePi

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages