Go Down

Topic: Fire Fighting Robot Project {HELP} (Read 4242 times) previous topic - next topic

PaulS

Code: [Select]
int smokeA0 = A5;
I really need to ask what the heck that name means.

Code: [Select]
  pinMode(smokeA0, INPUT);
What do you think pinMode does? For analog pins, NOTHING.

Code: [Select]
    Serial.print("Pin A0: ");
    Serial.println(analogSensor);

That's silly output, considering that you did NOT read from analog pin 0.

Aside from these issues, and the useless curly braces around the code to read from pin A5 and print stuff, I see no issues with the code. So, you must have a hardware problem - probably power related. So, a schematic is in order.
The art of getting good answers lies in asking good questions.

Step202

#16
Jan 29, 2017, 05:28 pm Last Edit: Jan 29, 2017, 05:46 pm by Step202
how can i fix this power issue I have : 1  D 9V battery,and  4 AA 1.5V battery. Because it won't move at all now before it was moving did the autonomous part and now it doesn't move at all. Please Help

PaulS

Quote
how can i fix this power issue I have
Use a battery charger and charge the batteries.
The art of getting good answers lies in asking good questions.

Go Up