Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
mimaretM

mimaret

@mimaret
About
Posts
17
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Repeater node crashes
    mimaretM mimaret

    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();
      }
    }
    Troubleshooting

  • Gateway on Raspberry pi 1
    mimaretM mimaret

    @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.

    General Discussion
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular