Open cfreeman opened 7 years ago
The only driver that has been tested so far is i2c ( during the development of #72 ), GPIO, LED and SPI have not been tested yet.
Ran some more tests today. GPIO works in both directions and the pin mappings all work out and line up with the 'block' from Sparkfun.
embd.InitGPIO()
defer embd.CloseGPIO()
p, _ := embd.NewDigitalPin(46)
p.SetDirection(embd.In)
for i := 0; i < 50; i++ {
o, _ := p.Read()
fmt.Printf("PIN: %d\n", o)
time.Sleep(1 * time.Second)
}
Reading from a switch/button requires 1k pullup resistor.
Pin outs for the Edison are based on this 'block' from sparkfun -- https://www.sparkfun.com/products/13038