This is the remote control code from the Ingenium team.
The src code consists of an arduino sketch containing a .ino
file:
- The values of the sensors such as the joysticks are readed by the librairies (listed in the Dependecies)
- The sending data are encoded in a json format with the ArduinoJson library following the next template:
{
"switch": true,
"keypad": 3,
"joysticks": {
"left": {
"x": 512,
"y": 512,
"clck": true
},
"right": {
"x": 512,
"y": 512,
"clck": false
}
}
}
- Then, there are send via SoftwareSerial to the bluetooth module every 40 milliseconds (about 25 times per second)
N.B. All this process is done by the Bluetooth library
The INO file depends of the following list of libraries:
- Bluetooth
- Arduino/SoftwareSerial: This library is built into the Arduino IDE
- bblanchon/ArduinoJson
- Joystick
- Led
- Report
- Chris--A/Keypad
- Arduino Nano
- Two double-axes potentiometers (joysticks)
- Three LEDs
- Switch
- ON/OFF switch
- 4x3 matrix keypad :
1 | 2 | 3 |
4 | 5 | 6 |
7 | 8 | 9 |
# | 0 | * |
- HC-05 bluetooth module