How to make a DIY Bluetooth control boat using Arduino

Build a Bluetooth-controlled boat by connecting an Arduino to a motor controller, powering it with a battery, and controlling it wirelessly via a Bluetooth module and smartphone app. The Arduino receives commands, and the controller drives the boat's motor(s). More detail needed?

SCIENCE PROJECTS

1/1/20251 min read

The process of this Bluetooth control boat When power On this boat, the Bluetooth module starts the data communication process. That is, data is communicated between the Bluetooth control app and the Bluetooth module. After, this data is sent to the Arduino UNO board through the Serial communication method. Then, the motors rotate according to that data. All these are done through the Arduino program.

OK, let's do this Bluetooth-controlled boat project.

You'll need: an

Arduino UNO,

HC-05 Bluetooth module,

L298N motor driver,

two gear motors,

two robot wheels,

one caster wheel,

two Li-ion batteries,

a Li-ion battery holder,

jumper wires, rigid foam,

and popsicle sticks.


/*How to make a Bluetooth control boat using Arduino Home Page *

/ #define IN1 2 #define IN2 3 #define IN3 4 #define IN4 5 void setup() { Serial.begin(9600); pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT); pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT); } void loop() { if (Serial.available() > 0) { char value = Serial.read(); Serial.print(value); if (value == 'F') { forward(); } else if (value == 'B') { backward(); } else if (value == 'L') { left(); } else if (value == 'R') { right(); } else { Stop(); } } } void forward() { digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW); digitalWrite(IN3, HIGH); digitalWrite(IN4, LOW); } void backward() { digitalWrite(IN1, LOW); digitalWrite(IN2, HIGH); digitalWrite(IN3, LOW); digitalWrite(IN4, HIGH); } void left() { digitalWrite(IN1, LOW); digitalWrite(IN2, HIGH); digitalWrite(IN3, HIGH); digitalWrite(IN4, LOW); } void right() { digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW); digitalWrite(IN3, LOW); digitalWrite(IN4, HIGH); } void Stop() { digitalWrite(IN1, LOW); digitalWrite(IN2, LOW); digitalWrite(IN3, LOW); digitalWrite(IN4, LOW); }