Arduino is an open-source, electronic prototyping platform. We will Arduino Uno/Nano microcontrollers to give life to the sumobots.
Arduino can used alongside a variety of high-level languages. The default language in the Arduino IDE is a subset of C/C++, and general familiarity with these languages is highly recommended.
Getting started: C++ Tutorial for Beginners - Programming with Mosh
Basic Arduino tutorial: Arduino MASTERCLASS - Programming Electronics Academy
For beginners, it's highly recommended to try the following worksheet in order to get comfortable with C++ syntax and problem-solving.
- Introductory tasks
- Solutions (Note: attempt the questions on your own before referring to the key.)
Automated testing (optional): You can check the validity of your solutions either manually (trying different inputs) or by utilizing our testing module as follows:
- Clone the repository:
git clone https://github.com/YorkURobotics/yurs-sumobot-onboarding
- Write your code in the template using any text editor or IDE of your choice.
- Navigate to the
scripts
directory and execute the following:./test-intro-tasks
Sample output:
* Test sumDouble: PASS
* Test diff21: PASS
* Test parrotTrouble: FAIL
* Test makes10: FAIL
* Test nearHundred: FAIL
* Test arrayCount9: PASS
* Test arrayFront9: PASS
* Test array123: FAIL
* Test squirrelPlay: PASS
* Test caughtSpeeding: FAIL
The sumobots are autonomous, thus requiring sensory inputs from its environment to make decisions. We'll be using:
- An ultrasonic (distance) sensor to detect the enemy bots
- A reflectance sensor to keep the robot inside the ring