4bmecc
Published © LGPL

Flash

Are you too lazy to use a remote control car? Create a new one!

IntermediateFull instructions provided103
Flash

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
or any other microcontroller
×1
SparkFun Full-Bridge Motor Driver Breakout - L298N
SparkFun Full-Bridge Motor Driver Breakout - L298N
We use that one https://www.amazon.it/Pixnor-Doppio-Stepper-Driver-Controller/dp/B0113QWPCA/ref=sr_1_2?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&keywords=l298n&qid=1558281508&s=toys&sr=1-2
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
9V battery (generic)
9V battery (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Amazon Web Services car chassis + dc motor with wheels
We use that one https://www.amazon.it/perseids-Chassis-Motore-Intelligent-Encoder/dp/B07DNX1DX9/ref=pd_sbs_23_2/259-1916456-4662045?_encoding=UTF8&pd_rd_i=B07DNX1DX9&pd_rd_r=8eb63647-7a4c-11e9-9b6c-0f9ea93917a8&pd_rd_w=h5RUd&pd_rd_wg=HwK7Y&pf_rd_p=37660d27-94f1-4ebe-be01-184b332a9b15&pf_rd_r=13SNH5P3W0KPVA23KM4Z&psc=1&refRID=13SNH5P3W0KPVA23KM4Z
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)
Multitool, Screwdriver
Multitool, Screwdriver

Story

Read more

Schematics

img_jG64RstiCd.png

We use another motor driver because on http://fritzing.org/home/ there was not the L298N Dual H Bridge

Code

Relazione_listato.ino

Arduino
You have to download an application form the play store or the apple store. The app is called "ARDUINO BLUETOOTH RC CAR"
#include <SoftwareSerial.h>

char data = 0; 

void setup() {
 
Serial.begin(9600);        

  // Impostazione canale A
  
pinMode(5, OUTPUT); 

pinMode(6, OUTPUT);  

  // Impostazione canale B
  
pinMode(10, OUTPUT);

pinMode(11, OUTPUT); 

}

void loop() {

   

  if (Serial.available() > 0) 
  
  {
    
    data = Serial.read();      
    
    Serial.print(data);        
    
    Serial.print("\n");       
    
    switch (data) {
      
      case '1':
        // Motor A
        digitalWrite(5, HIGH);  
        digitalWrite(6, LOW);   
        analogWrite(3, 255);    
        // Motor B 
        digitalWrite(10, HIGH);  
        digitalWrite(11, LOW);   
        analogWrite(9, 255);   
          break;
      case '2':
        // Motor A
        digitalWrite(5, HIGH);  
        digitalWrite(6, LOW);   
        analogWrite(3, 0);      
        // Motor B
        digitalWrite(10, LOW);    
        digitalWrite(11, LOW);    
        analogWrite(9, 0);      
        break;
      case '3':
        // Motor A
        digitalWrite(5, HIGH);  
        digitalWrite(6, LOW);   
        analogWrite(3, 255);    
        // Motor B
        digitalWrite(10, HIGH); 
        digitalWrite(11, LOW);    
        analogWrite(9, 127);     
        break;
      case '4':
        // Motor A
        digitalWrite(5, HIGH);   
        digitalWrite(6, LOW);    
        analogWrite(3, 127);     
        // Motor B
        digitalWrite(10, HIGH);  
        digitalWrite(11, LOW);    
        analogWrite(9, 255);    
        break;
        

  }
}
}

Credits

4bmecc

4bmecc

0 projects • 0 followers

Comments

Add projectSign up / Login