pos = 1023; pos = map(pos, 0, 1023, 0, 179);
//Default movement without serial input
I'm actually trying to write code so that when a user sends a value between 0-1023, the program would be able to map it accordingly and rotate the motor. I'm not sure how to use the serial commands for me to be able to do this without using 1023 cases
With case f, I'm trying to make the motor move in the opposite direction.
case 'f': pos = -1023; pos = map(pos, 0, -1023, 0, 179); myservo.write(pos); break; // serial input read and stored
I know that time control is neccessary to make the motor move in different direction...but with the Servo.h library, is this necessary?
Any help would be great!