Wifi controlled car using bolt wifi module and arduino uno error with controller.html

#include <BoltIoT-Arduino-Helper.h>

define left_motor1 6

define left_motor2 7

define right_motor1 8

define right_motor2 9

define sensor 3

String command = “”;
int delay_time = 250;

String check() {
int sensor_value = digitalRead(sensor);
Serial.println(sensor_value);
Serial.println(command);
if ((sensor_value == 0) && (command == “FORWARD”)) {
digitalWrite(left_motor2,LOW);
digitalWrite(left_motor1,LOW);
digitalWrite(right_motor1,LOW);
digitalWrite(right_motor2,LOW);
command = “”;
}
return “STOP”;
}

String forward(String *data) {
command = “FORWARD”;
digitalWrite(left_motor1,HIGH);
digitalWrite(left_motor2,LOW);
digitalWrite(right_motor1,LOW);
digitalWrite(right_motor2,HIGH);
return “Success:Forward”;
}

String backward(String *data) {
command = “BACKWARD”;
digitalWrite(left_motor1,LOW);
digitalWrite(left_motor2,HIGH);
digitalWrite(right_motor1,HIGH);
digitalWrite(right_motor2,LOW);
return “Success:Backward”;
}

String right(String *data) {
command = “RIGHT”;
digitalWrite(left_motor1,LOW);
digitalWrite(left_motor2,HIGH);
digitalWrite(right_motor1,LOW);
digitalWrite(right_motor2,HIGH);
delay(delay_time);
digitalWrite(left_motor2,LOW);
digitalWrite(left_motor1,LOW);
digitalWrite(right_motor1,LOW);
digitalWrite(right_motor2,LOW);
return “Success:Left”;
}

String left(String *data) {
command = “LEFT”;
digitalWrite(left_motor1,HIGH);
digitalWrite(left_motor2,LOW);
digitalWrite(right_motor1,HIGH);
digitalWrite(right_motor2,LOW);
delay(delay_time);
digitalWrite(left_motor2,LOW);
digitalWrite(left_motor1,LOW);
digitalWrite(right_motor1,LOW);
digitalWrite(right_motor2,LOW);
return “Success:Right”;
}

String stopcar(String *data) {
digitalWrite(left_motor2,LOW);
digitalWrite(left_motor1,LOW);
digitalWrite(right_motor1,LOW);
digitalWrite(right_motor2,LOW);
return “Success:Stop”;
}

void setup() {
// put your setup code here, to run once:
pinMode(left_motor1,OUTPUT);
pinMode(left_motor2,OUTPUT);
pinMode(right_motor1,OUTPUT);
pinMode(right_motor2,OUTPUT);
pinMode(sensor,INPUT);
boltiot.begin(Serial);
Serial.begin(9600);
boltiot.setCommandString(“FORWARD”,forward);
boltiot.setCommandString(“BACKWARD”,backward);
boltiot.setCommandString(“LEFT”,left);
boltiot.setCommandString(“RIGHT”,right);
boltiot.setCommandString(“STOP”,stopcar);
}

void loop() {
// put your main code here, to run repeatedly:
boltiot.handleCommand();
check();
}
This is the original code

And check(); is already there in it @vinayak.joshi

Also after doing the testing I m facing another problem…that is the IR sensor when connected to arduino, doesn’t come on and the arduino also is not coming on… when I remove the connection of the ir sensor then tge adruino comes on…

Pls help sir @vinayak.joshi

Pls help me sir i tried alot still can get what is the error @vinayak.joshi

Hi @erinepereira27,

I believe it is not going to possible to debug your issue here in the forum. Can you have a live session this Saturday, to debug your issue?
I might not have time before Saturday to have this session, that’s why i have suggested this Saturday.

Yes sir … jus tell me the time I am ready to have a live session @vinayak.joshi

Hi @erinepereira27,

I will drop you an email by the end of the day with the details.

Ok sir my email id erinepereira27@gmail.com @vinayak.joshi

Sir zoom app will be downloaded and kept pls sned the link of the meeting
Thank you
@vinayak.joshi

Dear Sir… tomorrow is live session rht?

Pls send link of the same @vinayak.joshi

@erinepereira27 provide me ardino code if you done this project help me

i am passing all same issuse please help @vinayak.joshi, @erinepereira27

@anujkumar123929 is your project working ?

no , i am facing same all issuse @erinepereira27

here is problem , when i entered api key and device id and submit it then space empty, its not work , how to solve it @vinayak.joshi, @erinepereira27

here no movement in car, but output is success @vinayak.joshi

Hi @anujkumar123929,

The success that is shown only means that the Bolt Cloud has confirmed that the command reahed the Bolt WiFi module.
Please share the code that you have written and the connection diagrams of your circuit so that I may help you figure out the issue.

i use motor drive two times in my project but every time motor drive work some time, and after some time motor drive faulty, why
@vinayak.joshi
i using L298N motor drive , i purchase motor drive from flipkart two times

Hi,

Maybe there is some issue with the motor driver design that you are using. Can you share a link where you bought the motor driver from?

9v battery not enough for this battery, battery fastly discharge , which type of battery i use sir @vinayak.joshi

Hi @anujkumar123929,

Best to go for rechargable Lithium Ion batteries. You can look these up on google, you will find a purchase link for the same.