Playing with RC car is fun but if you play with your own RC car then its a explosion of fun. Now a days most of the RC car controller user BLE technology with may reduce the cost. Every smart phone has BLE, so let play with it. If you follow this tutorials you are able to build your own DRY RC car.
Thanks to DFRobot to give me the opportunity to play with Romeo BLE Quard Motor Driver . Its a powerful motor driver with 32 bit ARM Microcontroller with CC2540 (Bluetooth 4.0) chip. For more detail about Romeo BLE quard please check the page.
Just follow those simple step and enjoy:
—Install the Mobile apps on your smart phone (check the given links for apk file)
—Connect the Rover5 Chassis with BLE Quard Motor Driver
* @file BLE-control_motord_rive.ino* @brief Motor control program for Romeo BLE Quard V1.0 using Mobile Application via Bluethooth* @Control Command Use 'F'for Forward 'B' for backwoard 'L' for Left and 'R' for Right* @ Here i use two Motor noly MA and MC possible to extend with forur Motor* control motor using BLE via Bluno Test Apps* * @author [email protected]* @version V1.0* @date 2017-01-05* pin mapping ref: https://www.dfrobot.com/wiki/index.php/Romeo_BLE_Quad_Robot_Controller_SKU:_DFR0398 * product wiki: https://www.dfrobot.com/wiki/index.php/Romeo_BLE_Quad_Robot_Controller_SKU:_DFR0398*/// motor oneconstintIA1=8;constintIA2=23;// motor TwoconstintIB1=7;constintIB2=9;// motor ThreeconstintIC1=24;constintIC2=14;// motor fourconstintID1=4;constintID2=25;bytebyteRead;voidsetup(){Serial1.begin(115200);//initial the Serial//use four motorpinMode(IA1,OUTPUT);pinMode(IA2,OUTPUT);pinMode(IB1,OUTPUT);pinMode(IB2,OUTPUT);pinMode(IC1,OUTPUT);pinMode(IC2,OUTPUT);pinMode(ID1,OUTPUT);pinMode(ID2,OUTPUT);pinMode(13,OUTPUT);pinMode(20,OUTPUT);// place a LED on pin 20 }//use slow decay PWM value maximum 100 ref https://www.dfrobot.com/wiki/index.php/Dual_1.5A_Motor_Driver_-_HR8833_SKU:_DRI0040voidloop(){digitalWrite(13,LOW);digitalWrite(20,LOW);Motor_reset();/* check if data has been sent from the computer: */if(Serial1.available()){/* read the most recent byte */byteRead=Serial1.read();/*Listen for a F which means Forward */if(byteRead=='F'){Serial1.println("Moving Forward");digitalWrite(13,HIGH);digitalWrite(20,HIGH);MA_move(50,0);MC_move(50,0);delay(1000);}elseif(byteRead=='B'){Serial1.println("Moving Backword");digitalWrite(20,HIGH);MA_move(50,1);MC_move(50,1);delay(1000);}elseif(byteRead=='L'){Serial1.println("Moving Left");digitalWrite(20,HIGH);MA_move(50,0);MC_move(50,1);delay(1000);}elseif(byteRead=='R'){Serial1.println("Moving Right");digitalWrite(20,HIGH);MA_move(50,1);MC_move(50,0);delay(1000);}else{/*ECHO the value that was read, back to the serial port. */Serial1.write(byteRead);}}}//fuction that reset all the motor voidMotor_reset(){//reset the motor AdigitalWrite(IA1,LOW);digitalWrite(IA2,LOW);//reset the motor BdigitalWrite(IB1,LOW);digitalWrite(IB2,LOW);//reset the motor CdigitalWrite(IC1,LOW);digitalWrite(IC2,LOW);//reset the motor DdigitalWrite(ID1,LOW);digitalWrite(ID2,LOW);}voidMA_move(intSpeed,intdir)//for dir FALSE move forward, otherwise Backword {if(dir==0){analogWrite(IA1,Speed);//set the PWM valuedigitalWrite(IA2,HIGH);}else{analogWrite(IA2,Speed);//set the PWM valuedigitalWrite(IA1,HIGH);}}voidMB_move(intSpeed,booldir)//for dir FALSE move forward, otherwise Backword {if(dir==0){analogWrite(IB1,Speed);//set the PWM valuedigitalWrite(IB2,HIGH);}else{analogWrite(IB2,Speed);//set the PWM valuedigitalWrite(IB1,HIGH);}}voidMC_move(intSpeed,booldir)//for dir FALSE move forward, otherwise Backword {if(dir==0){analogWrite(IC1,Speed);//set the PWM valuedigitalWrite(IC2
This article takes a closer look at each of these devices, comparing them across key areas like Python support, ease of use, Python programming tools, pin design, and hardware projects.
Deciding between Scratch and Python for your child's coding journey? This article compares both languages based on learning background, goals, methods, and difficulty.