Hey I am trying to set 5 servos to an initial and final position for the set up for a robot hand that I am making, but i keep getting the error code of
/Users/mugiwara/Documents/Arduino/setup/setup.ino: In function 'void setup()':
setup:20: error: a function-definition is not allowed here before '{' token
void alltovirtual() {
^
setup:29: error: a function-definition is not allowed here before '{' token
void alltorest() {
^
setup:38: error: a function-definition is not allowed here before '{' token
void alltomax() {
^
exit status 1
a function-definition is not allowed here before '{' token
I am just using the code that was given with the design of the hand that should work, the script that I've got at the moment is
You seem to have void setup in there twice. I'm thinking only the second one belongs and it needs the semicolon removed. You will then need to remove the last curly brace too.
Delta_G thank you very much for your help, I started a new script and made the edits that you advised and it managed to work. Apologies for being a noob, I have just read through many of the other posts regarding how to properly ask for help and what not to do (realising how many of those mistakes I myself made in my first post) but am grateful for your assistance, I was freaking out a little bit before because coding is definitely not one of my strengths.