1
0
mirror of https://github.com/kidoman/embd synced 2024-05-29 07:08:04 +02: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)
defer spiBus.Close()
adc := mcp3008.New(mcp3008.SingleMode, spiBus)
adc := mcp3008.New(mcp3008.SingleMode, mcp3008.Bits10, spiBus)
for i := 0; i < 20; i++ {
time.Sleep(1 * time.Second)