building a mock arduino polygraph, so coding sketches to control servos so that they twitch as if they were responding to body variations. Having issues renaming the servo to 1servo as I need to run three off one program. Really need help desperately, I am an arduino noob!
Having issues renaming the servo to 1servo as I need to run three off one program.
What issues? Why not use legal names, like servo1, instead?
Variable names in 'C'/C++ (and many similar languages) are not allowed to start with a number. They can contain numbers, as long as the number is not at the start of the name.
However, any time you find yourself using numbers to differentiate between multiple similar variables, you should ask yourself whether you should be using an array instead. In this case the answer is almost certainly yes.
Most programming languages that I have experience with don't like to have numbers as the first character of a label. It would be better to give a more descriptive name anyway. Like pulseServo, or respireServo, Makes the code much easier to follow.
@tomplumptre DO NOT CROSS POST!!!
What @Grumpy_Mike said. Topics merged.