编辑: xiong447385 2019-07-06

8 /

16 3.2 程序代码 本文将结合代码在注释部分解释程序设计思路 #include #include #include #include #define STEPS

220 #define COUNT_MAX

3100 #define COUNT_MIN

0 LiquidCrystal_I2C lcd(0x27,16,2);

Stepper stepper(STEPS, 8, 9, 10, 11);

int potpin=0;

int val=0;

int RECV_PIN = 2;

int count=0;

unsigned long last = millis();

//下面七个十六进制数分别对应本系统遥控器的七个按键 long clockwise = 0x00FF22DD;

long anticlockwise = 0x00FF02FD;

long pause = 0x00FFC23D;

long back = 0x00FF629D;

long MANUAL = 0x00FFA25D;

long LIGHT = 0x00FFE21D;

IRrecv irrecv(RECV_PIN);

decode_results results;

//无返回值函数,可以检测信号协议类型并进行解码 void dump(decode_results *results) { int count = results->

rawlen;

if (results->

decode_type == UNKNOWN) { Serial.println( Could not decode message );

} else { if (results->

decode_type == NEC) { Serial.print( Decoded NEC: );

} else if (results->

decode_type == SONY)

9 /

16 { Serial.print( Decoded SONY: );

} else if (results->

decode_type == RC5) { S........

下载(注:源文件不在本站服务器,都将跳转到源网站下载)
备用下载
发帖评论
相关话题
发布一个新话题