mirror of
https://github.com/kidoman/embd
synced 2025-07-04 12:27:45 +02:00
simplify package structure
This commit is contained in:
parent
3cae4064dc
commit
36f2c0486d
41 changed files with 736 additions and 885 deletions
|
@ -6,17 +6,17 @@ import (
|
|||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/kidoman/embd/i2c"
|
||||
"github.com/kidoman/embd"
|
||||
"github.com/kidoman/embd/sensor/bmp180"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := i2c.Open(); err != nil {
|
||||
if err := embd.InitI2C(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer i2c.Close()
|
||||
defer embd.CloseI2C()
|
||||
|
||||
bus := i2c.NewBus(1)
|
||||
bus := embd.NewI2CBus(1)
|
||||
|
||||
baro := bmp180.New(bus)
|
||||
defer baro.Close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue