EasyManua.ls Logo

Eckstein komponente KS0530 - Page 148

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...
148
int ud_angle = 10;//set the initial angle to 10 degree;keep the solar
panels upright to detect the strongest light
int l_state = A0;//define the analog voltage input of the photoresistors
int r_state = A1;
int u_state = A2;
int d_state = A3;
const byte buzzer = 6; //set the pin of the buzzer to digital pin 6
const byte lr_servopin = 9;//define the control signal pin of the servo
rotating right and left
const byte ud_servopin = 10;//define the control signal pin of the servo
rotating clockwise and anticlockwise
unsigned int light; //save the variable of light intensity
byte error = 15;//Define the error range to prevent vibration
byte m_speed = 10;//set delay time to adjust the speed of servo;the
longer the time, the smaller the speed
byte resolution = 1; //set the rotation accuracy of the servo, the
minimum rotation angle
int temperature; //save the variable of temperature
int humidity; //save the variable of humidity