Introduction: Speed Math Game With Arduino
Hi, how fast can you do math? Speed Math Game is a fun way to learn and practice your math skills.
It has 3 levels (Easy, Medium and Hard).
The easy level shows numbers between 1 and 10.
In the Medium level the first operand of the operation is a number between 50 and 99 and the second operand is a number between 1 and 10.
The Hard level shows numbers between 50 and 99.
When the game starts, it displays the level mode, press 1, 2 or 3 to select the level.
After, operations ("+", "-", "*", "/") will be randomly generated, and the user will type the result of the operation, while the time elapsed is shown (minutes, seconds, and hundreths of seconds).
Only type the result, and if it is right, automatically the next operation is shown (NO Enter key is needed), if you make a mistake in the result, a sad face is shown and you can correct.
Step 1: Lists of Materials.
- Arduino One or another model.
- Hex keyboard.
- LCD 16x2
Step 2: Wiring
Hookup all the components according to the circuit diagram shown above.
Step 3: The Code
The code uses the random function for generating random numbers, and also generates a random number between 1 and 4 for the operation.
If it is 1, the operation is ADD (+)
If it is 2, the operation is SUBS (-)
If it is 3, the operation is MUL (*)
If it is 4, the operation is DIV (/).
Also shows a timer in the right top of the display.
time = millis()-inicio;
Download the full code here
I hope you like my project, and if so, please vote for it in the maker olympics contest.
Suggestions? Questions? Commets? Please let me know it.
We have a be nice policy.
Please be positive and constructive.