Home→Forums→MonoBrick EV3 Firmware→Gyro readings corrupted!→Reply To: Gyro readings corrupted!
April 10, 2014 at 21:17
#4138
544449
Participant
Have you tried to do a similar thing with the standard firmware?
No, we haven’t tried to do same thing with standard firmware.
It also appears that at 1ms sampling time every other sample is duplicated (or I just didn’t rotate gyro fast enough).
below is the code that was used for measurements:
using System;
using System.Threading;
using System.Collections.Generic;
using System.Resources;
using MonoBrickFirmware.Display;
using MonoBrickFirmware.UserInput;
using MonoBrickFirmware.Sensors;
namespace GyroSensorExample
{
class MainClass
{
public static void Main (string[] args)
{
var gyro = new EV3GyroSensor(SensorPort.In1, GyroMode.Angle);
gyro.Reset();
Thread.Sleep(1000);
int x=0;
do
{
Console.WriteLine("{0:F}", gyro.Read());
Thread.Sleep(20);
x++;
}
while (x < 1000);
}
}
}
Follow