Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. scottdube
    3. Topics
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Topics created by scottdube

    • scottdube

      control 12 V fan via Vera/Arduino
      Vera • • scottdube  

      10
      0
      Votes
      10
      Posts
      2115
      Views

      dbemowsk

      @scottdube Something like that.
    • scottdube

      Mysensors Sensebender GW delivery from China?
      Hardware • • scottdube  

      3
      0
      Votes
      3
      Posts
      781
      Views

      scottdube

      @alexsh1 Wow that's great... It gives me confidence that it will eventually show up. I did contact them and they gave me no real answer. Thanks again.
    • scottdube

      Newbie timer question
      Development • • scottdube  

      3
      0
      Votes
      3
      Posts
      576
      Views

      Yveaux

      @scottdube If your code is allowed to block during the wait, the implementation can be very straightforward (untested): // ...setup etc... void loop() { static int prevState = LOW; int state = digitalRead(ZwavePin); if (state != prevState) { // ZWavePin state has changed // Determine target state of relay const int pinState = (state == HIGH) ? LOW : HIGH; // Set Fire relay digitalWrite(FirePin, pinState); // Wait some ms delay(5000); // Set Fan relay digitalWrite(FanPin, pinState); // Remember current ZWavePin state to be able to detect changes prevState = state; } } As your description doesn't mention the source of the ZWavePin, it might require debouncing if it is a mechanical switch.