Table of Contents

The Bluebot Controller App, paired with HC05 and a robot, transforms your smartphone into a dynamic control hub for seamless robotic navigation. This comprehensive guide walks you through building and controlling a robot using the Bluebot Controller App, HC05 Bluetooth module, and Arduino. Whether you’re a hobbyist or a beginner, you’ll master robot control in 10 straightforward steps. Let’s dive into creating your own robot with the Bluebot Controller App and HC05 for an exciting, hands-on experience.
Why Build a Robot with the Bluebot Controller App?
Robots spark curiosity, and controlling them via a smartphone app like the Bluebot Controller App makes the process accessible and enjoyable. The HC05 Bluetooth module ensures reliable communication between your Arduino-based robot and the app. This project empowers you to explore robotics, learn coding, and control a robot with precision. Additionally, it’s a fantastic way to understand electronics and wireless communication. Let’s break down the components, setup, and coding to get your robot moving.
Components Required for Your Bluebot-Controlled Robot
To build a robot compatible with the Bluebot Controller App and HC05, gather the following components. Each plays a critical role in ensuring your robot functions smoothly.
Components for Bluebot Robot
| Component | Description |
|---|---|
| Arduino Nano or Uno | Microcontroller to process commands and control motors. |
| Arduino Nano Expansion Board | Simplifies connections for Arduino Nano, optional for Uno. |
| L298N Motor Driver | Controls the speed and direction of DC motors. |
| HC05 Bluetooth Module | Enables wireless communication between the Bluebot Controller App and the robot. |
| DC Motors (x4) | Powers the robot’s movement, paired with wheels. |
| Wheels (x4) | Attaches to DC motors for mobility. |
| External Power Supply (12V 1A) | Ensures stable power for motors and Arduino. |
| Programming Cable | Connects Arduino to your computer for uploading code. |
| Breadboard (Optional) | Facilitates prototyping and easy connections if needed. |
These components ensure your robot responds seamlessly to commands from the Bluebot Controller App via the HC05 module.
Step 1: Understanding the Bluebot Controller App and HC05
The Bluebot Controller App serves as the command center for your robot. Available on the Google Play Store (download here), it sends commands like forward, backward, left, right, and stop to the HC05 Bluetooth module. The HC05 relays these commands to the Arduino, which controls the robot’s motors. This setup makes the Bluebot Controller App and HC05 a perfect duo for wireless robot control.
Why Use the Bluebot Controller App?
The app’s intuitive design simplifies robot control, even for beginners. It eliminates the need for complex coding knowledge, allowing you to focus on building and experimenting. The HC05 ensures a stable Bluetooth connection, making your robot responsive and fun to operate.
Step 2: Assembling the Hardware
Start by connecting the components. The L298N motor driver powers the four DC motors, while the Arduino processes commands from the Bluebot Controller App via the HC05. Follow these steps:
- Mount the Motors and Wheels: Attach the four DC motors to a chassis and connect the wheels securely.
- Connect the L298N Motor Driver: Wire the motors to the L298N’s output pins (OUT1-OUT4). Connect the L298N’s input pins (IN1-IN4) to Arduino pins 6, 7, 8, and 9.
- Wire the HC05 Module: Connect the HC05’s RX to Arduino pin 3 (TX) and TX to Arduino pin 2 (RX). Power the HC05 with 5V and GND from the Arduino.
- Power Supply: Use a 12V 1A external power supply for the L298N and motors. Connect the Arduino to a separate 5V source or USB for stability.
- Optional Breadboard: Use a breadboard for prototyping connections before soldering for a permanent setup.
Ensure all connections are secure to avoid communication issues with the Bluebot Controller App and HC05.
Step 3: Creating the Circuit Diagram
The circuit diagram illustrates how the Arduino, L298N, HC05, and motors connect. Below is a textual representation of the circuit, based on the provided code’s pin assignments.

Bluebot Robot Circuit Diagram
Circuit Diagram Description
Arduino powered via USB or 5V source
Arduino Nano/Uno:
Pin 2 (TX) → HC05 RX
Pin 3 (RX) → HC05 TX
Pin 6 → L298N IN1 (Left Motor Forward)
Pin 7 → L298N IN2 (Left Motor Backward)
Pin 8 → L298N IN3 (Right Motor Forward)
Pin 9 → L298N IN4 (Right Motor Backward)
5V → HC05 VCC
GND → HC05 GND, L298N GND
L298N Motor Driver:
OUT1, OUT2 → Left DC Motors (x2)
OUT3, OUT4 → Right DC Motors (x2)
12V Input → External 12V 1A Power Supply
GND → Common Ground with Arduino
HC05 Bluetooth Module:
VCC → Arduino 5V
GND → Arduino GND
RX → Arduino Pin 3
TX → Arduino Pin 2
Power Supply:
12V 1A → L298N Power Input
This setup ensures the Bluebot Controller App communicates flawlessly with the robot via the HC05 module.
Step 4: Uploading the Code to Arduino
The provided Arduino code enables the robot to respond to commands from the Bluebot Controller App. Below is the complete code, optimized for clarity and functionality.
Bluebot Robot Arduino Code (Without Speed Control)
| 1 | #include <softwareserial.h> |
| 2 | |
| 3 | // bluetooth pins |
| 4 | softwareserial btserial(2, 3); // rx, tx |
| 5 | |
| 6 | // motor pins |
| 7 | #define lm1 6 |
| 8 | #define lm2 7 |
| 9 | #define rm1 8 |
| 10 | #define rm2 9 |
| 11 | |
| 12 | char val; |
| 13 | |
| 14 | void setup() { |
| 15 | |
| 16 | // set motor pins as outputs |
| 17 | pinmode(lm1, output); |
| 18 | pinmode(lm2, output); |
| 19 | pinmode(rm1, output); |
| 20 | pinmode(rm2, output); |
| 21 | |
| 22 | // start bluetooth |
| 23 | btserial.begin(9600); |
| 24 | |
| 25 | serial.begin(9600); // for debugging |
| 26 | serial.println("ready for bluetooth control"); |
| 27 | } |
| 28 | |
| 29 | void loop() { |
| 30 | |
| 31 | // read bluetooth command |
| 32 | if (btserial.available()) { |
| 33 | |
| 34 | val = btserial.read(); |
| 35 | |
| 36 | serial.print("got command: "); |
| 37 | serial.println(val); |
| 38 | } |
| 39 | |
| 40 | // move motors based on command |
| 41 | if (val == 'F') { |
| 42 | |
| 43 | // go forward |
| 44 | digitalwrite(lm1, high); |
| 45 | digitalwrite(lm2, low); |
| 46 | |
| 47 | digitalwrite(rm1, high); |
| 48 | digitalwrite(rm2, low); |
| 49 | } |
| 50 | |
| 51 | else if (val == 'B') { |
| 52 | |
| 53 | // go backward |
| 54 | digitalwrite(lm1, low); |
| 55 | digitalwrite(lm2, high); |
| 56 | |
| 57 | digitalwrite(rm1, low); |
| 58 | digitalwrite(rm2, high); |
| 59 | } |
| 60 | |
| 61 | else if (val == 'L') { |
| 62 | |
| 63 | // turn left |
| 64 | digitalwrite(lm1, low); |
| 65 | digitalwrite(lm2, high); |
| 66 | |
| 67 | digitalwrite(rm1, high); |
| 68 | digitalwrite(rm2, low); |
| 69 | } |
| 70 | |
| 71 | else if (val == 'R') { |
| 72 | |
| 73 | // turn right |
| 74 | digitalwrite(lm1, high); |
| 75 | digitalwrite(lm2, low); |
| 76 | |
| 77 | digitalwrite(rm1, low); |
| 78 | digitalwrite(rm2, high); |
| 79 | } |
| 80 | |
| 81 | else if (val == 'X') { |
| 82 | |
| 83 | // stop |
| 84 | digitalwrite(lm1, low); |
| 85 | digitalwrite(lm2, low); |
| 86 | |
| 87 | digitalwrite(rm1, low); |
| 88 | digitalwrite(rm2, low); |
| 89 | } |
| 90 | } |
How the Code Works
- SoftwareSerial Library: Facilitates communication with the HC05 module on pins 2 (TX) and 3 (RX).
- Motor Control: Pins 6, 7, 8, and 9 control the L298N motor driver, directing the robot’s movements.
- Commands: The Bluebot Controller App sends characters (‘F’, ‘B’, ‘L’, ‘R’, ‘X’) to move the robot forward, backward, left, right, or stop.
- Debugging: Serial output helps troubleshoot Bluetooth communication issues.
Upload this code using the Arduino IDE and a programming cable. Disconnect the HC05 during upload to avoid serial conflicts.
Bluebot Robot Arduino Code (Wit Speed Control)
| 1 | #include <SoftwareSerial.h> |
| 2 | |
| 3 | // Bluetooth module connection |
| 4 | SoftwareSerial BTSerial(2, 3); // RX, TX |
| 5 | |
| 6 | // L298N pins (Arduino Uno) |
| 7 | #define ENA 5 // Left motor speed (PWM) |
| 8 | #define ENB 10 // Right motor speed (PWM) |
| 9 | #define IN1 9 // Left motor forward |
| 10 | #define IN2 8 // Left motor backward |
| 11 | #define IN3 7 // Right motor forward |
| 12 | #define IN4 6 // Right motor backward |
| 13 | |
| 14 | // Constants |
| 15 | const int MAX_SPEED = 255; // Maximum motor speed (PWM) |
| 16 | const int DEFAULT_SPEED = 127; // Default speed (around 50%) |
| 17 | |
| 18 | // Variables |
| 19 | String command = ""; // String to store received command |
| 20 | char commandChar; // Received character |
| 21 | int speed = DEFAULT_SPEED; // Motor speed |
| 22 | |
| 23 | void setup() { |
| 24 | // Initialize serial communication |
| 25 | Serial.begin(9600); |
| 26 | BTSerial.begin(9600); |
| 27 | |
| 28 | // Set all motor control pins as outputs |
| 29 | pinMode(ENA, OUTPUT); |
| 30 | pinMode(ENB, OUTPUT); |
| 31 | pinMode(IN1, OUTPUT); |
| 32 | pinMode(IN2, OUTPUT); |
| 33 | pinMode(IN3, OUTPUT); |
| 34 | pinMode(IN4, OUTPUT); |
| 35 | |
| 36 | // Initially stop motors |
| 37 | stopMotors(); |
| 38 | |
| 39 | Serial.println("Bluetooth Robot Ready"); |
| 40 | } |
| 41 | |
| 42 | void loop() { |
| 43 | // Check for incoming Bluetooth data |
| 44 | if (BTSerial.available()) { |
| 45 | commandChar = BTSerial.read(); |
| 46 | |
| 47 | // If newline or carriage return, process the command |
| 48 | if (commandChar == 'n' || commandChar == 'r') { |
| 49 | processCommand(); |
| 50 | command = ""; // Clear command string |
| 51 | } else { |
| 52 | // Add character to command string |
| 53 | command += commandChar; |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | void processCommand() { |
| 59 | Serial.print("Command received: "); |
| 60 | Serial.println(command); |
| 61 | |
| 62 | // Parse command and speed |
| 63 | int commaIndex = command.indexOf(','); |
| 64 | |
| 65 | if (commaIndex != –1) { |
| 66 | // Command with speed parameter (e.g., "F,80") |
| 67 | String directionCmd = command.substring(0, commaIndex); |
| 68 | String speedStr = command.substring(commaIndex + 1); |
| 69 | |
| 70 | // Convert speed percentage to PWM value (0-255) |
| 71 | int speedPercent = speedStr.toInt(); |
| 72 | speed = map(speedPercent, 0, 100, 0, MAX_SPEED); |
| 73 | |
| 74 | // Execute command with specified speed |
| 75 | executeCommand(directionCmd); |
| 76 | } else { |
| 77 | // Command without speed parameter |
| 78 | executeCommand(command); |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | void executeCommand(String cmd) { |
| 83 | if (cmd == "F") { |
| 84 | moveForward(); |
| 85 | } else if (cmd == "B") { |
| 86 | moveBackward(); |
| 87 | } else if (cmd == "L") { |
| 88 | turnLeft(); |
| 89 | } else if (cmd == "R") { |
| 90 | turnRight(); |
| 91 | } else if (cmd == "X") { |
| 92 | stopMotors(); |
| 93 | } else if (cmd == "Y") { |
| 94 | // Custom action Y – For example, turn 180 degrees |
| 95 | turnAround(); |
| 96 | } else if (cmd == "Z") { |
| 97 | // Custom action Z – For example, spin in place |
| 98 | spinInPlace(); |
| 99 | } else if (cmd == "A") { |
| 100 | // Custom action A – For example, small move forward |
| 101 | smallMoveForward(); |
| 102 | } else if (cmd == "T") { |
| 103 | // Test function – Run a test sequence |
| 104 | testSequence(); |
| 105 | } else if (cmd == "D") { |
| 106 | // Debug function – Print status information |
| 107 | debugInfo(); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | void moveForward() { |
| 112 | Serial.print("Moving forward at speed: "); |
| 113 | Serial.println(speed); |
| 114 | |
| 115 | // Left motor forward |
| 116 | digitalWrite(IN1, HIGH); |
| 117 | digitalWrite(IN2, LOW); |
| 118 | analogWrite(ENA, speed); |
| 119 | |
| 120 | // Right motor forward |
| 121 | digitalWrite(IN3, HIGH); |
| 122 | digitalWrite(IN4, LOW); |
| 123 | analogWrite(ENB, speed); |
| 124 | } |
| 125 | |
| 126 | void moveBackward() { |
| 127 | Serial.print("Moving backward at speed: "); |
| 128 | Serial.println(speed); |
| 129 | |
| 130 | // Left motor backward |
| 131 | digitalWrite(IN1, LOW); |
| 132 | digitalWrite(IN2, HIGH); |
| 133 | analogWrite(ENA, speed); |
| 134 | |
| 135 | // Right motor backward |
| 136 | digitalWrite(IN3, LOW); |
| 137 | digitalWrite(IN4, HIGH); |
| 138 | analogWrite(ENB, speed); |
| 139 | } |
| 140 | |
| 141 | void turnLeft() { |
| 142 | Serial.print("Turning left at speed: "); |
| 143 | Serial.println(speed); |
| 144 | |
| 145 | // Left motor stop or backward |
| 146 | digitalWrite(IN1, LOW); |
| 147 | digitalWrite(IN2, HIGH); |
| 148 | analogWrite(ENA, speed); |
| 149 | |
| 150 | // Right motor forward |
| 151 | digitalWrite(IN3, HIGH); |
| 152 | digitalWrite(IN4, LOW); |
| 153 | analogWrite(ENB, speed); |
| 154 | } |
| 155 | |
| 156 | void turnRight() { |
| 157 | Serial.print("Turning right at speed: "); |
| 158 | Serial.println(speed); |
| 159 | |
| 160 | // Left motor forward |
| 161 | digitalWrite(IN1, HIGH); |
| 162 | digitalWrite(IN2, LOW); |
| 163 | analogWrite(ENA, speed); |
| 164 | |
| 165 | // Right motor stop or backward |
| 166 | digitalWrite(IN3, LOW); |
| 167 | digitalWrite(IN4, HIGH); |
| 168 | analogWrite(ENB, speed); |
| 169 | } |
| 170 | |
| 171 | void stopMotors() { |
| 172 | Serial.println("Stopping motors"); |
| 173 | |
| 174 | // Stop both motors |
| 175 | digitalWrite(IN1, LOW); |
| 176 | digitalWrite(IN2, LOW); |
| 177 | analogWrite(ENA, 0); |
| 178 | |
| 179 | digitalWrite(IN3, LOW); |
| 180 | digitalWrite(IN4, LOW); |
| 181 | analogWrite(ENB, 0); |
| 182 | } |
| 183 | |
| 184 | void turnAround() { |
| 185 | Serial.println("Turning around"); |
| 186 | |
| 187 | // Left motor backward |
| 188 | digitalWrite(IN1, LOW); |
| 189 | digitalWrite(IN2, HIGH); |
| 190 | analogWrite(ENA, speed); |
| 191 | |
| 192 | // Right motor forward |
| 193 | digitalWrite(IN3, HIGH); |
| 194 | digitalWrite(IN4, LOW); |
| 195 | analogWrite(ENB, speed); |
| 196 | |
| 197 | // Turn for a specific duration |
| 198 | delay(1000); |
| 199 | |
| 200 | // Stop motors |
| 201 | stopMotors(); |
| 202 | } |
| 203 | |
| 204 | void spinInPlace() { |
| 205 | Serial.println("Spinning in place"); |
| 206 | |
| 207 | // Left motor forward |
| 208 | digitalWrite(IN1, HIGH); |
| 209 | digitalWrite(IN2, LOW); |
| 210 | analogWrite(ENA, speed); |
| 211 | |
| 212 | // Right motor backward |
| 213 | digitalWrite(IN3, LOW); |
| 214 | digitalWrite(IN4, HIGH); |
| 215 | analogWrite(ENB, speed); |
| 216 | |
| 217 | // Spin for a specific duration |
| 218 | delay(500); |
| 219 | |
| 220 | // Stop motors |
| 221 | stopMotors(); |
| 222 | } |
| 223 | |
| 224 | void smallMoveForward() { |
| 225 | Serial.println("Small move forward"); |
| 226 | |
| 227 | // Move forward at default speed |
| 228 | digitalWrite(IN1, HIGH); |
| 229 | digitalWrite(IN2, LOW); |
| 230 | analogWrite(ENA, speed); |
| 231 | |
| 232 | digitalWrite(IN3, HIGH); |
| 233 | digitalWrite(IN4, LOW); |
| 234 | analogWrite(ENB, speed); |
| 235 | |
| 236 | // Move for a short duration |
| 237 | delay(250); |
| 238 | |
| 239 | // Stop motors |
| 240 | stopMotors(); |
| 241 | } |
| 242 | |
| 243 | void testSequence() { |
| 244 | Serial.println("Running test sequence"); |
| 245 | |
| 246 | // Forward |
| 247 | moveForward(); |
| 248 | delay(1000); |
| 249 | |
| 250 | // Stop |
| 251 | stopMotors(); |
| 252 | delay(500); |
| 253 | |
| 254 | // Backward |
| 255 | moveBackward(); |
| 256 | delay(1000); |
| 257 | |
| 258 | // Stop |
| 259 | stopMotors(); |
| 260 | delay(500); |
| 261 | |
| 262 | // Turn left |
| 263 | turnLeft(); |
| 264 | delay(500); |
| 265 | |
| 266 | // Stop |
| 267 | stopMotors(); |
| 268 | delay(500); |
| 269 | |
| 270 | // Turn right |
| 271 | turnRight(); |
| 272 | delay(500); |
| 273 | |
| 274 | // Stop |
| 275 | stopMotors(); |
| 276 | } |
| 277 | |
| 278 | void debugInfo() { |
| 279 | Serial.println("==== Debug Info ===="); |
| 280 | Serial.print("Current speed: "); |
| 281 | Serial.println(speed); |
| 282 | Serial.print("Last command: "); |
| 283 | Serial.println(command); |
| 284 | Serial.println("===================="); |
| 285 | |
| 286 | // Send debug info to Bluetooth as well |
| 287 | BTSerial.println("==== Debug Info ===="); |
| 288 | BTSerial.print("Current speed: "); |
| 289 | BTSerial.println(speed); |
| 290 | BTSerial.print("Last command: "); |
| 291 | BTSerial.println(command); |
| 292 | BTSerial.println("===================="); |
| 293 | } |
Step 5: Pairing the HC05 with the Bluebot Controller App
To connect the HC05 to the Bluebot Controller App:
- Power on the robot and HC05 module.
- Open your smartphone’s Bluetooth settings and pair with the HC05 (default password is typically 1234 or 0000).
- Launch the Bluebot Controller App (download here).
- Select the HC05 module within the app to establish a connection.
The app’s user-friendly interface makes sending commands effortless, enhancing the Bluebot Controller App and HC05 experience.
Step 6: Exploring the Bluebot Controller App Features
The Bluebot Controller App simplifies robot control with these key features:
- Directional Controls: Buttons for forward (‘F’), backward (‘B’), left (‘L’), right (‘R’), and stop (‘X’).
- Real-Time Response: Commands are transmitted instantly via Bluetooth, ensuring smooth robot movement.
- Beginner-Friendly Interface: Designed for ease of use, the app requires no prior coding expertise.
- HC05 Compatibility: Works seamlessly with the HC05 module and Arduino-based robots.
Download the app from the Google Play Store (link) to start controlling your robot today.
Step 7: Testing Your Robot
With the circuit complete, code uploaded, and HC05 paired, test your robot:
- Place the robot on a flat surface.
- Open the Bluebot Controller App and send commands.
- Confirm the robot moves forward, backward, left, right, or stops as expected.
- If issues occur, check connections, HC05 pairing, and Serial Monitor output for debugging.
This step verifies that the Bluebot Controller App, HC05, and robot operate in sync.
Step 8: Troubleshooting Common Issues
Encountering problems? Here are solutions:
- HC05 Not Pairing: Verify the module is powered and the correct password is used.
- Robot Not Moving: Inspect motor connections and L298N power supply. Ensure the code is uploaded correctly.
- App Not Responding: Confirm the HC05 is selected in the Bluebot Controller App.
- Erratic Movement: Use a stable 12V 1A power supply and secure all wiring.
These tips ensure your robot and Bluebot Controller App function reliably.
Step 9: Enhancing Your Robot
To elevate your robot’s capabilities:
- Add PWM Control: Modify the code to use PWM pins (e.g., 5, 10) for variable speed control.
- Incorporate Sensors: Add ultrasonic or infrared sensors for obstacle avoidance.
- Upgrade Chassis: Use a sturdier chassis for improved durability.
These enhancements make your Bluebot Controller App and HC05-powered robot even more versatile.
Step 10: Optimizing for Long-Term Use
To ensure your robot remains reliable:
- Secure Connections: Solder wires to prevent loose connections.
- Battery Management: Use a rechargeable 12V battery for portability.
- Regular Updates: Check for Bluebot Controller App updates on the Google Play Store (link).
- Backup Code: Save the Arduino code for quick re-uploads.
These practices maintain a dependable robot controlled by the Bluebot Controller App and HC05.
SEO-Optimized Meta Description
Master robot control with the Bluebot Controller App and HC05. Build your robot in 10 steps! Download now: https://play.google.com/store/apps/details?id=com.eleobo.bluebot_controller (134 characters)
Conclusion
Building a robot with the Bluebot Controller App, HC05, and Arduino unlocks endless possibilities in robotics. This guide provides a clear, beginner-friendly path to creating a functional robot in 10 steps. From assembling components to coding and testing, you now have the tools to control a robot effortlessly. Download the Bluebot Controller App (link) and embark on your robotics journey today. For more Arduino projects, visit Arduino’s official site. Happy building!
Download BlueBot Controller App and start your journey today!
