TankBOT working but issues and want to go wifi with changes


hi everyone

i have interest in arduino , want start new project

i have build rover/tank/bot

my goal

1. change on wifi esp8266
2. able control speed
3. temperature displayed on app
4. able see value of ultrasonic sensor on app


perhaps have built configuration before , might assist me , possible app?

currently im  connecting via bluetooth using bluetooth rc controller android app
it works cannot control speed , not wifi

hardware
• wifi serial transceiver module esp8266
• logic level converter bi-directional
• l298 dual h-bridge motor driver
• arduino uno
•      dht11 temperature sensor
•      ultrasonic sensor

or  
• arduino pro mini 328

code

code: [select]
// bluetooth-bot v1
// arduino robotics unofficial chapter 14
// use bluetooth mate serial adapter receive commands phone
// arduino decodes commands motor movements
// uses keys "f" = forward, "l" = left, "b" = reverse, , "r" = right
// l298 motor control variables
int m1_a = 12;
int m1_pwm = 11;
int m1_b = 10;
int m2_a = 4;
int m2_pwm = 3;
int m2_b = 2;
// variable store serial data
int incomingbyte = 0;
//////////////////////////////
void setup(){
// start serial monitor @ 9600 bps
serial.begin(9600);
// declare outputs
pinmode(m1_a, output);
pinmode(m1_pwm, output);
pinmode(m1_b, output);
pinmode(m2_a, output);
pinmode(m2_pwm, output);
pinmode(m2_b, output);
}
////////////////////////////////////
void loop(){
// check serial data
if (serial.available() > 0) {
// read incoming byte:
incomingbyte = serial.read();
// got:
serial.print("i received: ");
serial.println(incomingbyte);
// delay 10 milliseconds allow serial update time
delay(10);
// if byte equal "70" or "f", go forward
if (incomingbyte == 70){
m1_forward();
m2_forward();
delay(25);
}
// if byte equal "82" or "r", go right
else if (incomingbyte == 82){
m1_reverse();
m2_forward();
delay(25);
}
// if byte equal "76" or "l", go left
else if (incomingbyte == 76){
m1_forward();
m2_reverse();
delay(25);
}
// if byte equal "66" or "b", go reverse
else if (incomingbyte == 66){
m1_reverse();
m2_reverse();
delay(25);
}
// otherwise, stop both motors
else {
m1_stop();
m2_stop();
}
}
}
/////////// motor functions ////////////////
void m1_reverse(){
digitalwrite(m1_b, low);
digitalwrite(m1_a, high);
analogwrite(m1_pwm, 250);
}
void m1_forward(){
digitalwrite(m1_a, low);
digitalwrite(m1_b, high);
analogwrite(m1_pwm, 250);
}
void m1_stop(){
digitalwrite(m1_b, low);
digitalwrite(m1_a, low);
digitalwrite(m1_pwm, 0);
}
void m2_forward(){
digitalwrite(m2_b, low);
digitalwrite(m2_a, high);
analogwrite(m2_pwm, 250);
}
void m2_reverse(){
digitalwrite(m2_a, low);
digitalwrite(m2_b, high);
analogwrite(m2_pwm, 250);
}
void m2_stop(){
digitalwrite(m2_b, low);
digitalwrite(m2_a, low);
digitalwrite(m2_pwm, 0);
}

quote
and possible app?
the esp8266 can function web server, how control web page?


Arduino Forum > Using Arduino > Project Guidance > TankBOT working but issues and want to go wifi with changes


arduino

Comments