|
|
ARDUINO_NANO |
x 1 | |
|
L293DSTMicroelectronics
|
x 1 | |
|
|
HC05 Bluetooth |
x 1 | |
|
PPN7PA12C1NMB TECHNOLOGIES CORPORATION
|
x 4 | |
|
|
Switch |
x 1 | |
|
TB003V-500-P02BECUI DEVICES
|
x 4 | |
|
|
Male Header Connector |
x 2 |
Arduino Control Bluetooth Car Controller
Connect all the components to the PCB.
Motor Pins
Motor 1 - D6, D9
Motor 2 - D10, D11
# define leftMfront 6
# define leftMback 9
# define rightMfront 10
# define rightMback 11
# define frontL 2
# define backL 4
# define horn 7
int mSpeed = 255;
char data;
void setup() {
pinMode(leftMfront, OUTPUT);
pinMode(leftMback, OUTPUT);
pinMode(rightMfront, OUTPUT);
pinMode(rightMback, OUTPUT);
pinMode(frontL, OUTPUT);
pinMode(backL, OUTPUT);
pinMode(horn, OUTPUT);
Serial.begin(9600);
}
/*
* T-Robotics| 2023
* Contact - mail.trobotics@gmail.com
* +94718134650
*/
void loop() {
if (Serial.available()) {
data = Serial.read();
Serial.println(data);
if (data == 'F') {
goFront();
}
else if (data == 'B') {
goBack();
}
else if (data == 'R') {
goRight();
}
else if (data == 'L') {
goLeft();
}
else if (data == 'G') {
forwardLeft();
}
else if (data == 'I') {
forwardRight();
}
else if (data == 'H') {
backLeft();
}
else if (data == 'j') {
backRight();
}
else if (data == 'S') {
Stop();
}
else if (data == '1') {
mSpeed = 100;
}
else if (data == '2') {
mSpeed = 110;
}
else if (data == '3') {
mSpeed = 130;
}
else if (data == '4') {
mSpeed = 150;
}
else if (data == '5') {
mSpeed = 170;
}
else if (data == '6') {
mSpeed = 190;
}
else if (data == '7') {
mSpeed = 210;
}
else if (data == '8') {
mSpeed = 220;
}
else if (data == '9') {
mSpeed == 230;
}
else if (data == 'q') {
mSpeed == 250;
}
else if (data == 'W') {
analogWrite(2, HIGH);
}
else if (data == 'w') {
analogWrite(2, LOW);
}
else if (data == 'V') {
analogWrite(4, HIGH);
}
else if (data == 'v') {
analogWrite(4, LOW);
}
else if (data == 'X') {
analogWrite(7, HIGH);
}
else if (data == 'x') {
analogWrite(7, LOW);
}
}
}
void goFront() {
analogWrite(leftMfront, mSpeed);
analogWrite(leftMback, 0);
analogWrite(rightMfront, mSpeed);
analogWrite(rightMback, 0);
}
void goBack() {
analogWrite(leftMfront, 0);
analogWrite(leftMback, mSpeed);
analogWrite(rightMfront, 0);
analogWrite(rightMback, mSpeed);
}
void goRight() {
analogWrite(leftMfront, mSpeed);
analogWrite(leftMback, 0);
analogWrite(rightMfront, 0);
analogWrite(rightMback, 0);
}
void goLeft() {
analogWrite(leftMfront, 0);
analogWrite(leftMback, 0);
analogWrite(rightMfront, mSpeed);
analogWrite(rightMback, 0);
}
void forwardLeft(){
analogWrite(leftMfront,mSpeed * 1/3);
analogWrite(leftMback, 0);
analogWrite(rightMfront, mSpeed);
analogWrite(rightMback, 0);
}
void forwardRight(){
analogWrite(leftMfront, mSpeed);
analogWrite(leftMback, 0);
analogWrite(rightMfront, mSpeed * 1 / 3);
analogWrite(rightMback, 0);
}
void backLeft(){
analogWrite(leftMfront, 0);
analogWrite(leftMback, mSpeed * 1 / 3);
analogWrite(rightMfront, 0);
analogWrite(rightMback, mSpeed);
}
void backRight(){
analogWrite(leftMfront, 0);
analogWrite(leftMback, mSpeed);
analogWrite(rightMfront, 0);
analogWrite(rightMback, mSpeed * 1 / 3);
}
void Stop() {
analogWrite(leftMfront, 0);
analogWrite(leftMback, 0);
analogWrite(rightMfront, 0);
analogWrite(rightMback, 0);
}
Arduino Control Bluetooth Car Controller
Project images are for reference only. Actual production is based on the manufacturing files on the project page.
Please review the designer's notes (e.g., PCB thickness) and select the appropriate options.
PCBWay is not responsible
for issues caused by unsuitable parameter selections.
For more important ordering information, please refer to
Read More
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Engineer
-
Programmable Mist Maker - XIAO / QT PY Extension
1150 2 1 -
RadioHAT - Raspberry Pi radio development platform
961 0 2 -
QWIIC-VL53L4CD Time-of-Flight Distance Sensor Module
1170 0 1 -
-
-
-
ARPS-2 – Arduino-Compatible Robot Project Shield for Arduino UNO
3382 0 6 -
-
A Compact Charging Breakout Board For Waveshare ESP32-C3
4001 3 8 -
AI-driven LoRa & LLM-enabled Kiosk & Food Delivery System
4391 2 2







