1
0
Fork 0
mirror of https://github.com/kidoman/embd synced 2025-07-03 11:57:38 +02:00

bring in the idea of a hardware abstraction layer

This commit is contained in:
Karan Misra 2014-02-27 04:24:53 +05:30
parent b4de382833
commit b5e2d0acc7
35 changed files with 994 additions and 971 deletions

View file

@ -3,13 +3,17 @@ package main
import (
"log"
"time"
"github.com/kidoman/embd/i2c"
"github.com/kidoman/embd"
"github.com/kidoman/embd/sensor/bmp085"
)
func main() {
bus := i2c.NewBus(1)
i2c, err := embd.NewI2C()
if err != nil {
panic(err)
}
bus := i2c.Bus(1)
baro := bmp085.New(bus)
defer baro.Close()