File tree 1 file changed +3
-5
lines changed 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 42
42
analogG = machine.ADC {machine .A2 }
43
43
44
44
// used by i2c tests
45
- accel * mpu6050.Device
46
45
powerpin = machine .D7
47
46
48
47
serial = machine .UART0
@@ -251,8 +250,7 @@ func i2cConnection() {
251
250
powerpin .Configure (machine.PinConfig {Mode : machine .PinOutput })
252
251
time .Sleep (100 * time .Millisecond )
253
252
254
- a := mpu6050 .New (machine .I2C0 )
255
- accel = & a
253
+ accel := mpu6050 .New (machine .I2C0 )
256
254
257
255
printtest ("i2cConnectionNoPower" )
258
256
@@ -268,10 +266,10 @@ func i2cConnection() {
268
266
printtest ("i2cConnectionPower" )
269
267
// turn on power and should be connected now
270
268
powerpin .High ()
271
- time .Sleep (500 * time .Millisecond )
269
+ time .Sleep (100 * time .Millisecond )
272
270
273
271
accel .Configure ()
274
- time .Sleep (500 * time .Millisecond )
272
+ time .Sleep (100 * time .Millisecond )
275
273
276
274
if ! accel .Connected () {
277
275
printtestresult ("fail" )
You can’t perform that action at this time.
0 commit comments