Keyestudio Ks0428 Manual page 198

Table of Contents

Advertisement

www.keyestudio.com
#define servoPin 9 //pin of servo
int pulsewidth; //save the pulse width value of servo
void setup(){
Serial.begin(9600);
irrecv.enableIRIn(); //Initialize the IR reception library
pinMode(ML_Ctrl, OUTPUT);
pinMode(ML_PWM, OUTPUT);
pinMode(MR_Ctrl, OUTPUT);
pinMode(MR_PWM, OUTPUT);
pinMode(SCL_Pin,OUTPUT);
pinMode(SDA_Pin,OUTPUT);
matrix_display(clear); //Clear Screen
matrix_display(start01); //show start picture
pinMode(servoPin, OUTPUT);
procedure(90); //Servo rotates to 90°
}
void loop(){
if (irrecv.decode(&results)) //receive the IR remote value
198

Advertisement

Table of Contents
loading

Table of Contents