![]() func (r *Adaptor) DigitalWrite(pin string, val byte) (err error).func (r *Adaptor) DigitalRead(pin string) (val int, err error).func (r *Adaptor) DigitalPin(pin string, dir string) (sysfsPin sysfs.DigitalPinner, err error).func (r *Adaptor) Connect() (err error).Package raspi contains the Gobot adaptor for the Raspberry Pi.įor further information refer to raspi README: You can follow the instructions for pi-blaster install in the pi-blaster repo here: Once you have compiled your code, you can upload your program and execute it on the Raspberry Pi from your workstation using the scp and ssh commands like this: $ scp raspi_blink ssh -t "./raspi_blink"įor extended PWM support on the Raspberry Pi, you will need to use a program called pi-blaster. GOARM=6 (Raspberry Pi A, A+, B, B+, Zero) ![]() Use the following GOARM values to compile depending on which model Raspberry Pi you are using: package mainĬompile your Gobot program on your workstation like this: $ GOARM=6 GOARCH=arm GOOS=linux go build examples/raspi_blink.go The pin numbering used by your Gobot program should match the way your board is labeled right on the board itself. Once installed, cross compile your program on your workstation, transfer the final executable to your Raspberry Pi, and run the program on the Raspberry Pi as documented here. You would normally install Go and Gobot on your workstation. We recommend updating to the latest Raspian Jessie OS when using the Raspberry Pi, however Gobot should also support older versions of the OS, should your application require this. The Gobot adaptor for the Raspberry Pi should support all of the various Raspberry Pi boards such as the Raspberry Pi 4 Model B, Raspberry Pi 3 Model B, Raspberry Pi 2 Model B, Raspberry Pi 1 Model A+, Raspberry Pi Zero, and Raspberry Pi Zero W.įor more info about the Raspberry Pi platform, click here. The Raspberry Pi is an inexpensive and popular ARM based single board computer with digital & PWM GPIO, and i2c interfaces built in.
0 Comments
Leave a Reply. |