1
0
mirror of https://github.com/kidoman/embd synced 2024-10-31 23:38:44 +01:00

Update mcp3008.go

Add newly required 3rd argument
This commit is contained in:
Nick Potts 2016-01-14 15:28:48 -07:00
parent bb0bc69e8c
commit 1cd92e3c2d

View File

@ -32,7 +32,7 @@ func main() {
spiBus := embd.NewSPIBus(embd.SPIMode0, channel, speed, bpw, delay) spiBus := embd.NewSPIBus(embd.SPIMode0, channel, speed, bpw, delay)
defer spiBus.Close() defer spiBus.Close()
adc := mcp3008.New(mcp3008.SingleMode, spiBus) adc := mcp3008.New(mcp3008.SingleMode, mcp3008.Bits10, spiBus)
for i := 0; i < 20; i++ { for i := 0; i < 20; i++ {
time.Sleep(1 * time.Second) time.Sleep(1 * time.Second)