I have 3D printed a small holder for a micro servo. It mounts on the top of the bot and holds an Ultrasonic 2 sensor. I would like my students to scan the sensor back and forth until they either found an object to chase after of found a place to escape to.
I also have the students use a full sized servo for a “weapon” on their sumo bots but in both cases the code is way to slow. I know that the ESP32 in the mBot2 has lots of additional timers and other dedicated hardware. Is there a way to use some of that to offload some tasks from the main loop?