Hey there guys, I would like to ask your help here. I've come up with a code and I put it in the void setup and placed it after Serial.begin(9600). The code goes like this:
The logic by the way is that the robot should remain still for a 3 seconds and should face the desired direction, depending on the pressed button. I tried compiling it and I got this error:
sketch_dec12b.cpp: In function 'void setup()':
sketch_dec12b:123: error: expected (' before '{' token sketch_dec12b:201: error: expected }' at end of input
I also tried it without the if()... else but although it didn't encounter any errors, it still didn't work when I plugged it in a power supply :~
Any replies would be deeply appreciated. Thanks in advance!
Woops, sorry 'bout that. :. What I mean to say is that the robot stayed immobile even after pushing the switch and the push button (but I'm thinking of changing the wirings in case that's the problem and not the program itself).
Anyways, I was maybe hoping if you can help me figure out a different code with the same logic as what I've posted a while ago... Thanks!