风扇代码
int val = 30; // variable to store the value read
int value = 0;
int state=0;
#define LEDPIN 9
#define LED_ON HIGH
#define LED_OFF LOW
#define CYCLE 20000 //us
#define HIGH_TIME value//us
void setup()
{
pinMode(LEDPIN,OUTPUT);
Serial.begin(9600); // setup serial
}