#include<LiquidCrystal.h>
LiquidCrystal lcd (22,23,24,25,26,27,28,29,30,31,32);
unsigned long c = 0,a = 1;
int dsq(unsigned lo);
void setup()
{
XXXXXXgin(16,2);
pinMode(33,OUTPUT);
digitalWrite(33,LOW);
pinMode(34,INPUT);
pinMode(35,INPUT);
pinMode(36,INPUT);
pinMode(37,INPUT);
XXXXXXint("0");
}
void loop()
{
if(digitalRead(34) == HIGH)
{
delay(200);
c++;
XXXXXXear();
XXXXXXint(c,DEC);
digitalWrite(33,LOW);
}
if(digitalRead(35) == HIGH)
{
delay(200);
c--;
XXXXXXear();
XXXXXXint(c,DEC);
digitalWrite(33,LOW);
}
if(digitalRead(36) == HIGH)
{
a = dsq(c);
}
}
int dsq(unsigned long i)
{
c = 0;
digitalWrite(33,LOW);
while(i>=0)
{
XXXXXXear();
XXXXXXint(i,DEC);
delay(1000);
i--;
if(digitalRead(37) == HIGH)
{
XXXXXXint(" suspend");
while(digitalRead(36)!=HIGH);
}
}
digitalWrite(33,HIGH);
XXXXXXear();
XXXXXXint("zeitigt");
delay(2000);
XXXXXXear();
XXXXXXint("0");
return 0;
}
上代码
话说我写的程序很不友好么