Navigation

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

    Best posts made by mimaret

    • RE: Repeater node crashes

      A big thank you for your contribution. I modified the program according to your proposals. Everything is working. I am attaching you the pieces of code relating to the door contact.
      My problem is solved.

      .
      .
      .
        attachInterrupt(digitalPinToInterrupt(DOOR_PIN), DoorMoving, CHANGE);
        DoorChange = 1;
        LastDoor = 0;
      }
      void DoorMoving() {
          DoorChange = 1;
      }
      
      void readDoor() {
        if (DoorChange) {
          boolean Door = (digitalRead(DOOR_PIN));
          if (Door != LastDoor) {
            send(msgDoor.set((Door) == HIGH ? 1 : 0));
            LastDoor = Door;
            DoorChange = 0;
          }
        }
      }
      .
      .
      .
      void loop() {
        unsigned long currentMillis = millis();
        readDoor();
        if (currentMillis - previousMillis >= UPDATE_INTERVAL) {
          previousMillis = currentMillis;
          readDHT();
          read1Wire();
        }
      }
      posted in Troubleshooting
      mimaret
      mimaret
    • RE: Gateway on Raspberry pi 1

      @eiten
      This is actually what I read while searching the docs. I will modify the sketches. In fact I have to modify 2 modules with DHT22 + 3 1-wire probes + 2 relays + 2 door contacts + pusher on an arduino nano RF. No problem and thanks again for your help.

      posted in General Discussion
      mimaret
      mimaret