1
0
mirror of https://github.com/kidoman/embd synced 2024-11-13 04:58:55 +01:00
embd/samples/spi.go

19 lines
243 B
Go
Raw Normal View History

2014-01-30 11:50:43 +01:00
package main
import (
"fmt"
"github.com/kid0m4n/go-rpi/spi"
)
func main() {
var rx_data uint8
fmt.Println("Hello")
bus, _ := spi.NewSpiBus()
rx_data, _ = bus.TransferAndRecieveByteData(8` )
fmt.Printf("Received %v \n", rx_data)
}