Skip to content

Commit

Permalink
i2c: refactor mpl115a2 to more cleanly return desired data as methods
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Feb 11, 2017
1 parent 2905849 commit 313d666
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/firmata_mpl115a2.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ func main() {

work := func() {
gobot.Every(1*time.Second, func() {
mpl115a2.GetData()

fmt.Println("Pressure", mpl115a2.Pressure)
fmt.Println("Temperature", mpl115a2.Temperature)
fmt.Println("Pressure", mpl115a2.Pressure())
fmt.Println("Temperature", mpl115a2.Temperature())
})
}

Expand Down

0 comments on commit 313d666

Please sign in to comment.