Hot answers tagged

5

There are two options that I can think of. Do the "hardware" fix before every run of the robot to reboot the sensor along with the "software" fix to zero it. Don't use the Angle reading at all. To calibrate the sensor, sample the rate (d/s) 10 times or so and take the average to get the "at rest" rate offset and store it in a variable. Subtract this ...


5

My team put their software fix in a loop with a small wait that cycles until the d/s = 0, then reset it to 0. Here's a simplified version: It works like a charm. We don't mess with the hardware reset anymore. Combined with a heading variable, a turn my block, and a few drive my blocks they can program a maze run in minutes. FWIW: They output their angle ...


4

The Gyro is a tricky sensor to use, but at yesterday's FLL competition in Elk River, at least 5 teams had worked out the issues to their satisfaction. I'm revealing their answers here. It is unfair to those teams, since their research does represent a significant advantage over other teams. That said, none of their solutions were complete. Each team had ...


3

Balanc3r is a good alternative for gyro-boy: http://robotsquare.com/2014/06/23/tutorial-building-balanc3r/ However, why do you conclude that the 45504 sensor is out of stock? In my region (Belgium) it can be ordered from the lego website and is listed as "Available", also it is contained in the core educational set (45544) which is certainly still available ...


2

Debugging tip: Inside of the wait loop, print the gyro angle on the screen so that you can see what the actual value is. In your code, I see... setMotor(motorB, 35); setMotor(motorC, -35); ...which presumably causes the robot to rotate clockwise. And also... setMotor(motorB, -35); setMotor(motorC, 35); ...which presumably rotates the robot counter ...


2

The most reliable way I've found to quickly reset the gyro is simply unplug it & plug it into a different input port, then unplug it & plug it back into it's port. Just unplugging & plugging it into the same port doesn't always work for me. My software always has a 1 sec delay as the first step, and then software reset of the gyro. This is so ...


1

Here are some gyro issues you still have to contend with. Lag. The gyro reading lags behind the actual movement. If, for example, you are spinning and waiting for a reading of 90 degrees before stopping the movement, you will be beyond 90 degrees after you stop, unless you are moving very slowly. Accuracy. They gyro only reads in increments of 1 degree and ...


Only top voted, non community-wiki answers of a minimum length are eligible