Oscar Tesniere

OSCAR TESNIERE

Profile Picture

Email: oscar.tesniere@mail.mcgill.ca

Website: About Me

A library to remote control Arduino boards

Motivations

Last year when I participated to the Forge I was highly frustrated by the limitations of hardware controllers made of two joysticks. Their main drawbacks were :

  • The cables were short, requiring teams to stay close to their robot.
  • The connections to the joysticks had bad contacts, increasing troobleshooting time and causing unexpected robot behavior during matches.

I came up with this idea of using a web-based interface to control the robot, which would solve both of these problems. The web interface would be accessible from any device with a browser, and the communication between the device and the robot would be wireless, eliminating the need for cables.

This was precisely adapted for the Forge given that we were using Arduino R4 Wifi boards which have built-in WiFi capabilities with the ESP32 wifi chip. I could thus implement a simple web server on the Arduino board to serve the control interface and handle incoming commands.

Implementation

The core components that I wanted to include were :

  • customizable add-on buttons to trigger specific calback functions : the teams write a void callback function and register a button to this callback
  • a joystick interface to control the robot’s movement in a differential pair configuration

The Joystick Controller

  • I could have opted for a “arcade drive” configuration with two separate joystick, like I did last year physically with the switch controller but for a user on a mobile phone its better to have a single joystick