This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
servo-180-test [2012/10/06 13:39] 85.218.109.130 created |
servo-180-test [2012/10/06 13:40] (current) 85.218.109.130 |
||
---|---|---|---|
Line 1: | Line 1: | ||
This code turns the servo between 0 and 180 and then back | This code turns the servo between 0 and 180 and then back | ||
- | <code arduino> | + | <code java> |
// servo test 180 > 0 > 180 | // servo test 180 > 0 > 180 | ||
Line 7: | Line 7: | ||
Servo myservo; // create servo object to control a servo | Servo myservo; // create servo object to control a servo | ||
- | + | int val; // variable to write to the servo | |
- | int val; // variable to read the value from the analog pin | + | |
void setup() | void setup() |