EasyManua.ls Logo

Eckstein komponente KS0530 - Page 54

Default Icon
160 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
54
Test Code
#include <Servo.h>
Servo ud_servo;//define the name of the servo rotating right
and left
int ud_angle = 10;//set the initial angle to 10 degree;keep the
solar panels upright to detect the strongest light
const byte ud_servopin = 10;//define the servo rotating
upwards and downwards and its control pin
void setup() {
ud_servo.attach(ud_servopin); // set the control pin of the
servo
ud_servo.write(ud_angle);
delay(1000);
}
void loop() {}