How can do something like this: IF HIGH && > 3000ms


i need some delay or timing code on receiver.
i need wait 3 second pulse or greater xbee 20, if not don't turn on led.


const int xbeepin20 = 7;       // pin 7
int led = 12;
int value20;         

void setup() {
  serial.begin(9600);                // testing
   pinmode(xbeepin20, input);         
}

void loop() {
     // read xbeepin20 value on arduino
     value20 = digitalread(xbeepin20); // pin 7
     serial.println(value20);  // testing only
 
    if (value20 == high)          // this:  if high && > 3000ms
    {
       digitalwrite(led, high); // led 12
    }
 
}

3000ms since when? form start of pulse?


Arduino Forum > Using Arduino > Programming Questions > How can do something like this: IF HIGH && > 3000ms


arduino

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support