One of things people want to do with Arduino is controlling things with serial monitor. Here are some command project uses:
myservo.write();
- Sends a position information to the servo
if(Serial.availiable())
- If serial monitor is available, then continues the loop between {
and }
intstate=Serial.parseInt();
- sets "state" to number, that has been sent to serial monitor
MoreaboutparseInt
- reads every number, sent to the serial monitor. It can read only numbers, not letters etc.
Important - Servo coding in this project is a bit different:
10 degrees = 0 degrees
90 degrees = 90 degrees
169 degrees = 180 degrees
I am not sure, why it is like that, but you can type any number from 10 to 169 to the serial monitor.
One of things people want to do with Arduino is controlling things with serial monitor. Here are some command project uses:
myservo.write();
- Sends a position information to the servo
if(Serial.availiable())
- If serial monitor is available, then continues the loop between {
and }
intstate=Serial.parseInt();
- sets "state" to number, that has been sent to serial monitor
MoreaboutparseInt
- reads every number, sent to the serial monitor. It can read only numbers, not letters etc.
Important - Servo coding in this project is a bit different:
10 degrees = 0 degrees
90 degrees = 90 degrees
169 degrees = 180 degrees
I am not sure, why it is like that, but you can type any number from 10 to 169 to the serial monitor.