Change sensortest for new MPU6050 module.

pull/167/head
Christopher Young 2015-12-27 16:26:14 -05:00
rodzic b06262bd32
commit 0088515be7
1 zmienionych plików z 1 dodań i 5 usunięć

Wyświetl plik

@ -3,13 +3,10 @@ package main
import ( import (
"../mpu6050" "../mpu6050"
"fmt" "fmt"
"github.com/kidoman/embd"
_ "github.com/kidoman/embd/host/all"
"net" "net"
"time" "time"
) )
var bus embd.I2CBus
var attSensor *mpu6050.MPU6050 var attSensor *mpu6050.MPU6050
func readMPU6050() (float64, float64) { func readMPU6050() (float64, float64) {
@ -19,8 +16,7 @@ func readMPU6050() (float64, float64) {
} }
func initMPU6050() { func initMPU6050() {
bus = embd.NewI2CBus(1) attSensor = mpu6050.New()
attSensor = mpu6050.New(bus)
} }
func main() { func main() {