Skip to content

Simple program written in Go for the JamHat from ModMyPi.

License

Notifications You must be signed in to change notification settings

adrianh-za/go-jamhat-rpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Go-JamHat-RPi

Simple program written in Go for the JamHat from ModMyPi. The code is meant to be simple and readable to get a basic understanding of how to interace with the JamHat. GPIO pin edge detection was not used for button presses, nor was PWM used to buzz the buzzer.

NOTE: As the buzzer uses GPIO Pin 20, PWM code not be used to make the buzzer buzz, so we just used basic on/off with sleeps.

Product from ModMyPi JAM HAT (LED & Buzzer Board)

Python source code for JamHat https://github.com/modmypi/Jam-HAT

Usage

  1. go get github.com/adrianh-za/go-jamhat-rpi
  2. browse to $/go/src/github.com/adrianh-za/go-jamhat-rpi
  3. sudo -E go run main.go
  4. ctrl-c to quit

Acknowledgements

This project uses the GPIO library written and maintained by Stian Eikeland

Gits

https://github.com/stianeikeland/go-rpio

TODO

  • Maybe in future use Pin Edge Detection to intercept button press/release events.
  • Possibly see if there is a way to use PWM with the buzzer. (software PWM perhaps)

About

Simple program written in Go for the JamHat from ModMyPi.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages