Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
jehankandtsadun_j
Published © Apache-2.0

Arduino Bluetooth car Library

Arduino Bluetooth car Library create Jehan_BT_car.h

ExpertFull instructions provided981
Arduino Bluetooth car Library

Things used in this project

Story

Read more

Schematics

Arduino Bluetooth car Library

Arduino Bluetooth car Library

Code

Arduino Bluetooth car Library

C/C++
Arduino Bluetooth car Library
#include <Jehan_BT_car.h>
int val;

//pin in L2985 Motor Contral
int in1 = 5; //in1
int in2 = 6; //in2
int in3 = 7; //in3
int in4 = 8; //in4

//difine pins

Jehan_BT_car jehan(in1,in2,in3,in4);


void setup() {
  jehan.PinSetup();
  Serial.begin(9600);
}

void loop() {
  if(Serial.available()){
    val = Serial.read();
  }

  if(val == '1'){
    jehan.forward_car(); // forward
  }
  else if(val == '2'){
    jehan.backward_car();// backward
  }
  else if(val == '3'){
    jehan.left_car();// left
  }
  else if(val == '4'){
    jehan.right_car();// right
  }
  else if(val == '5'){
    jehan.stop_car();// stop
  }


}

Credits

jehankandt
21 projects • 8 followers
Contact
sadun_j
0 projects • 1 follower
Contact

Comments

Please log in or sign up to comment.