Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gyro Sensor on BrickPi3 returns byte instead of short data #111

Open
salamanders opened this issue Jan 10, 2020 · 0 comments
Open

Gyro Sensor on BrickPi3 returns byte instead of short data #111

salamanders opened this issue Jan 10, 2020 · 0 comments

Comments

@salamanders
Copy link

BrickPi3, ev3dev, lejos, lego-ev3-gyro sensor, I’m getting odd readings. I was expecting degrees, but instead get 0-255 as I tilt the sensor.

Expected Outcome

From the ev3-gyro-sensor docs, it looks like it should be a signed 16-bit integer:
Which isn’t quite ideal, I can’t tell if it went in a circle, and the resolution isn’t as good as 360 degrees.

My readings over a few seconds, I was rocking it back and forth.
I confirmed this was the same reading from /sys/bus/lego/devices/spi0.1:S4:lego-ev3-gyro/lego-sensor/sensor0/device/lego-sensor/sensor0/value0 so it isn’t an artifact of Java or Kotlin.

and after some research, David L said:

"I've confirmed the problem on the BrickPi3 (firmware v1.4.6). There is a mode on the EV3 Color sensor that uses the same data format and that is working, so I am quite confident this is a BrickPi3 firmware issue. Best thing to do would be to test using Raspbian 4 Robots and if the same problem is there, file an issues with Dexter Industries."

After doing so, Nicole P. suggested I log the issue here.

Impact:

  • I can't access the angle speed measurement, but I can fake it using a delta from the last read - not a blocker.
  • 255 is less granular than 360, but not by much - not a blocker.
  • The biggest issue is "wind-up" - I can't tell if "245" is -10, or +245, without keeping track of the history - annoying, but not a blocker.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant