Please help me fix this code to maker it compile & work.
I get the following error when I compile my scetch: "ISO C++ forbids comparison between pointer and integer"
Here is the scetch:
int command = 0 ;
void setup() {
// put your setup code here, to run once:
delay(1000); // wait a bit before starting
Serial.begin(115200); // set up Serial library at 9600 bps
}
void loop() {
// put your main code here, to run repeatedly:
if (Serial.available() > 0) {
command = Serial.read();
if (command == "1")
//pan left
if (command == "2")
//pan center
if (command == "3")
//pan right
if (command == "4")
//tilt up
if (command == "5")
//tilt center
if (command == "6")
//tilt down
command = 0;
}
}
The error is displayed first on the following line: if (command == "1")
Pitty the "Here is that example slightly modifed to have more buttons" project it is not in c# source code with scetch, but as they say, beggars can't be choosers.