I2C Sensors (Compass & Gyro) w/ mBot Serial


#1

I have no success reading data from the Compass or Gyro sensor in the mBlock environment (using Green Flag hat).

I’ve made the demo program (defined here: http://learn.makeblock.com/en/me-3-axis-accelerometer-and-gyro-sensor/ ) several times across many sensors and mCore boards, but the sensor reads are always reported as 0.

Moving to an mBot Program hat, I changed out the Say blocks for Write Line. This program reliably displays reasonable sensor values over the Serial Monitor, values that change when I move the sensor.

Has anyone had better luck reading Gyro or Compass data into the Scratch half of mBlock?

–andrew


#2

This hint helped for me


#3

Thanks for that response. Do you mean the “update the firmware every time” hint or the “assign readings to variables” hint?

–andrew


#4

It worked after the firmware upgrade for me. Did not try it very often yet.


#5