Hi, I have the Romi Chassis 32U4, and have been trying to figure out code to make it turn a precise 90 degree angle. I’m quite new to programming, so I was wondering if you guys know any code/ ways to code that. Any help is appreciated! Thanks!
Hello.
There are two broad ways that you could approach that:
- You can use the inertial sensors on the Romi 32U4 as feedback for how far the robot has turned.
- Presuming you have the Romi encoders, you could use those to track how far each of the wheels moves.
It might be worth it to try both approaches to see which works better. There are example programs for reading both the inertial sensors and the encoders in the Romi 32U4 Arduino library that can help you get started.
- Patrick