Project 5A

I’m currently trying to get Project 5A coding to work, but I keep getting the message “a function-definition is not allowed here before ‘{’ token”, but I believe my code is correct since I’ve followed the code from here.

Please help, since this is for a school project.


Could you describe what "Project 5A" is? Is the code available online?

Note that if you copy the text (instead of posting a screen shot), the text becomes searchable which makes it much easier for other people to find this problem and the solution in the future.

Anyway, the line

pinMode(motionPin, INPUT)}

should be

pinMode(motionPin, INPUT);

note: last character should be ; instead of }