Hello, I am just starting out with Arduino and have some trouble with the " function-definition is not allowed here before '{' token" error. If someone could help, that would be great!
It says there is a problem on the second void loop line.
Here is the code:
int Pirsensor = 8;
const int trigPin = 13;
const int echoPin = 12;
Please read the post at the start of any forum , entitled "How to use this Forum".
OR http://forum.arduino.cc/index.php/topic,148850.0.html.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.