Chinise car with two motors upgrades to bluetooth car
What is used:
- Arduino UNO (Copy).
- I have been trying with Nano, but it does not worked for me. Maybe i am try later again ;)
- Bluetooth module HC-05.
- For easy way do not use HC-06 because of problem with Master-Slave.
- L298N driver for two motors with switch button.
- Chinise remote car.
- I have cutted off all except for 2 motors.
- Bluetooth RC Controller app (Android)
Do not forget: ------!!!!!!!!!------
- Bluetooth Rx to Uno Tx
- Bluetooth Tx to Uno Rx
- L298N power GND to Uno GND.
- Create the bluetooth pair: Smartphone + HC-05 before open the app (Android 10, maybe it is needed for earlier OS).
- App always send 'S' (Stop)
- Do not use any libraries. As i understand it does not work correct.
How does it works:
-
Uno creates Serial on 9600 with HC-05.
- HC-05 works on 9600, HC-06 on 38400.
-
Uno sets LOW signal to motors.
- digitalWrite(motorForward, LOW);
- digitalWrite(motorBack, LOW);
-
HC-05 connects to smartPhone and getting bytes like F - forward, B - backword... e.t.c from the app every 50 ms.
- S S S S S S S F F F F F S S B B B... e.t.c
-
Uno goes into Loop and Starts to read Serial port.
- if command from serial matches to one of the case, Uno set HIGH signal to one of the motors.
-
If command does not match it is ignored.
