微信公众号
蘑菇云创造


微信交流群

void setup(){
delay(20);
pinMode(5,OUTPUT);
pinMode(7,OUTPUT);
pinMode(6,OUTPUT);
pinMode(8,OUTPUT);
}
void loop(){
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (12))) {
play.SetVolume(31);
play.PlayMode(3);
}
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (24))) {
play.PlayMode(1);
dc_cfun5.motorrun(1,80);
}
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (94))) {
dc_cfun5.motorrun(1,0);
play.PlayMode(2);
}
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (8))) {
dc_cfun6.motorrun(1,60);
delay(1000*9);
dc_cfun6.motorrun(1,0);
}
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (28))) {
for(int repeatci=0;repeatci<50;repeatci++){
pinMode(6,OUTPUT);
myservo_cfun6.attach(6);
myservo_cfun6.write(45);
delay(1000*0.45);
pinMode(6,OUTPUT);
myservo_cfun6.attach(6);
myservo_cfun6.write(135);
delay(1000*0.45);
}
pinMode(6,OUTPUT);
myservo_cfun6.attach(6);
myservo_cfun6.write(90);
}
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (90))) {
dc_cfun6.motorrun(0,60);
delay(1000*9);
dc_cfun6.motorrun(1,0);
}
}
void setup(){
delay(20);
pinMode(5,OUTPUT);
pinMode(7,OUTPUT);
pinMode(6,OUTPUT);
pinMode(8,OUTPUT);
}
void loop(){
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (12))) {
play.SetVolume(31);
play.PlayMode(3);
}
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (24))) {
play.PlayMode(1);
dc_cfun5.motorrun(1,80);
}
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (94))) {
dc_cfun5.motorrun(1,0);
play.PlayMode(2);
}
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (8))) {
dc_cfun6.motorrun(1,60);
delay(1000*9);
dc_cfun6.motorrun(1,0);
}
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (28))) {
for(int repeatci=0;repeatci<50;repeatci++){
pinMode(6,OUTPUT);
myservo_cfun6.attach(6);
myservo_cfun6.write(45);
delay(1000*0.45);
pinMode(6,OUTPUT);
myservo_cfun6.attach(6);
myservo_cfun6.write(135);
delay(1000*0.45);
}
pinMode(6,OUTPUT);
myservo_cfun6.attach(6);
myservo_cfun6.write(90);
}
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (90))) {
dc_cfun6.motorrun(0,60);
delay(1000*9);
dc_cfun6.motorrun(1,0);
}
}
void setup(){
delay(20);
pinMode(5,OUTPUT);
pinMode(7,OUTPUT);
pinMode(6,OUTPUT);
pinMode(8,OUTPUT);
}
void loop(){
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (12))) {
play.SetVolume(31);
play.PlayMode(3);
}
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (24))) {
play.PlayMode(1);
dc_cfun5.motorrun(1,80);
}
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (94))) {
dc_cfun5.motorrun(1,0);
play.PlayMode(2);
}
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (8))) {
dc_cfun6.motorrun(1,60);
delay(1000*9);
dc_cfun6.motorrun(1,0);
}
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (28))) {
for(int repeatci=0;repeatci<50;repeatci++){
pinMode(6,OUTPUT);
myservo_cfun6.attach(6);
myservo_cfun6.write(45);
delay(1000*0.45);
pinMode(6,OUTPUT);
myservo_cfun6.attach(6);
myservo_cfun6.write(135);
delay(1000*0.45);
}
pinMode(6,OUTPUT);
myservo_cfun6.attach(6);
myservo_cfun6.write(90);
}
pinMode(11,INPUT);
if(((ir_cfun11.getCode()) == (90))) {
dc_cfun6.motorrun(0,60);
delay(1000*9);
dc_cfun6.motorrun(1,0);
}
}