The Elegoo Smart Robot Car Kit V3.0 is an excellent platform for anyone eager to dive into the world of robotics and Arduino programming. Whether you’re an electronics novice or an experienced Arduino IDE user looking to maximize the performance of its four DC motors, this kit offers a comprehensive and engaging experience. Priced competitively and readily available online, this kit is a fantastic choice for hobbyists and educational purposes alike. Let’s explore the programming aspects that bring this robot car to life.
Unboxing and Assembling Your Elegoo Smart Robot Car
Upon opening the box, you’ll find all components meticulously organized across two layers, each individually packed. Elegoo ensures you have everything you need, including a charger with 18650 batteries, essential screwdrivers, a CD-ROM containing INO files for the Arduino UNO, a USB cable, and detailed PDF manuals in multiple languages.
Before diving into programming, assembly is the first step. While the kit is thoughtfully designed, watching an assembly video is highly recommended, especially to differentiate between the similar acrylic plates. Both plates are marked “A”, but one has a cutout specifically for the SG90 Micro Servo motor used with the ultrasonic sensor.
Remember to remove the protective film from the black acrylic plates. For any assembly questions, Elegoo provides excellent support via email at [email protected] (EU/JP) and [email protected] (US/CA). Numerous helpful videos are also available, including unboxing and assembly tutorials, to guide you through the process.
Getting Started with Programming the Elegoo Smart Robot Car V3.0
Once your robot car is assembled, the real fun begins: programming. Initially, after powering on the car with the batteries, you might only see the LEDs light up. This is expected; movement is only enabled after you upload one of the provided INO files to the Arduino UNO.
The CD-ROM included in the kit, or the downloadable ZIP file from the Elegoo website, contains all necessary software and example code.
https://www.elegoo.com/tutorial/Elegoo%20Smart%20Robot%20Car%20Kit%20V3.0.2018.06.06.zip
Important Note: Before uploading any code to the Arduino UNO, ensure you disconnect the Bluetooth module from the shield. This is crucial for a successful upload process.
To program the Elegoo Smart Robot Car V3.0, you will need the Arduino IDE, which is a free, open-source software used for writing and uploading code to Arduino boards. After installing the Arduino IDE on your computer, connect the Arduino UNO to your computer using the provided USB cable.
Understanding the Basic Bluetooth Control Code
One of the first programs you might explore is the Bluetooth control sketch, “bluetooth_car.ino”. This code allows you to control your robot car wirelessly using a smartphone app. Elegoo recommends their “Elegoo BLE” app, available for free in app stores. This app lets you establish a connection to the Bluetooth module “HC-08” on your robot car and send commands via defined triggers.
The basic sketch responds to simple letter commands transmitted via Bluetooth. Here’s a breakdown of the default commands:
- Light on / off: “a”
- Forward: “f”
- Back: “b”
- Left: “l”
- Right: “r”
- Stop: “s”
This control logic is implemented in the loop()
function of the Arduino code:
void loop() {
getstr = Serial.read();
switch(getstr){
case 'f': forward(); break;
case 'b': back(); break;
case 'l': left(); break;
case 'r': right(); break;
case 's': stop(); break;
case 'a': stateChange(); break;
default: break;
}
}
You can customize these commands and the car’s behavior by modifying this code within the Arduino IDE and re-uploading it to the Arduino UNO.
Adjusting Speed and Exploring Further Programming
The default speed of the robot car is set by the carSpeed
variable in the code. Initially set to 150
, you can increase this value up to 255
to make the car move faster.
unsigned char carSpeed = 150;
Experimenting with this value and other parameters in the code is a great way to learn more about Arduino programming and how it controls the robot car’s motors and sensors.
Beyond Bluetooth control, the Elegoo Smart Robot Car Kit V3.0 supports other modes, including infrared (IR) control, obstacle avoidance, and line tracking. Example sketches for these modes are also included on the CD-ROM and in the download package, providing a fantastic starting point for exploring more advanced robotics concepts.
Conclusion: Your Journey into Robotics and Programming Begins
The Elegoo Smart Robot Car Kit V3.0 provides a hands-on and rewarding introduction to robotics and Arduino programming. By following these programming instructions and experimenting with the provided code examples, you’ll quickly grasp the fundamentals of controlling your robot car and begin to explore the vast possibilities of this versatile platform. Whether you’re building a fun project for yourself or looking for an educational tool, this kit is an excellent choice. Start building, start coding, and unleash your creativity with the Elegoo Smart Robot Car V3.0!