forked from hybridgroup/gobot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First cut of the GoPiGo3 driver, lacking grove peripherals.
- Loading branch information
1 parent
ca421ef
commit 94f5ded
Showing
10 changed files
with
800 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# SPI | ||
|
||
This package provides drivers for [spi](https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus) devices. It must be used along with the [raspberry pi](https://gobot.io/documentation/platforms/raspi) adaptor that supports the needed interfaces for spi devices. This uses the experimental [spi package](https://github.com/golang/exp/tree/master/io/spi) which only works on linux systems. | ||
|
||
## Getting Started | ||
|
||
## Installing | ||
``` | ||
go get -d -u gobot.io/x/gobot/... | ||
``` | ||
|
||
## Hardware Support | ||
Gobot has a extensible system for connecting to hardware devices. The following spi devices are currently supported: | ||
|
||
- GoPiGo3 robotics board (built for Rapsberry Pi, but in theory it could be used in another platform) | ||
|
||
More drivers are coming soon... | ||
|
||
## Using A Different Bus or Address | ||
|
||
You can set a different SPI address or SPI bus than the default when initializing your SPI drivers by using optional parameters. Here is an example: | ||
|
||
```go | ||
blinkm := spi.NewGoPiGo3DriverDriver(e, spi.WithBus(0), spi.WithAddress(0x10), spi.With) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Package spi provides Gobot drivers for spi devices. | ||
Uses "golang.org/x/exp/io/spi" for spi | ||
Installing: | ||
go get -d -u gobot.io/x/gobot | ||
For further information refer to spi README: | ||
https://github.com/hybridgroup/gobot/blob/master/drivers/spi/README.md | ||
*/ | ||
package spi // import "gobot.io/x/gobot/drivers/spi" |
Oops, something went wrong.