Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. C.r.a.z.y.
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by C.r.a.z.y.

    • 433mhz outlet

      I am trying to convert this code for outlet ; http://forum.mysensors.org/topic/7/controlling-blinds-com-rf-dooya-motors-with-arduino-and-vera/10 (note its using old lib)

      +vera doesn't give auto id (all other sensor like motion etc) so i made it int hey = 14; in this way i can get sketch name etc...

      my 433 on code : 1101010101011100000000110
      my 433 off code : 1101010101011100000011000

      on-off-433.png
      code txt : outlet433

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.
    • RE: Get string data

      Maybe one day someone will use this;

      **When sketch fails second push will work without gateway and it will restart
      **

      void loop()
      {
      gw.process();
      debouncer.update();
      value = debouncer.read();

      if (value != oldValue && value==0) {
      if (re!="1")
      {
      int oku=digitalRead(RELAY_PIN);
      if(oku==1)
      {
      digitalWrite(RELAY_PIN,0);
      }
      else
      {
      digitalWrite(RELAY_PIN,1);
      }
      asm volatile (" jmp 0"); //reboot
      }
      gw.send(msg.set(state?false:true),true); // Send new state and request ack back
      re="";
      }
      oldValue = value;
      }

      void incomingMessage(const MyMessage &message) {
      state = message.getBool();
      digitalWrite(RELAY_PIN, state?RELAY_ON:RELAY_OFF);
      gw.saveState(CHILD_ID, state);
      Serial.print("Incoming change for sensor:");
      Serial.print(message.sensor);
      Serial.print(", New status: ");
      Serial.println(message.getBool());
      re=String(message.sensor);
      }

      posted in Troubleshooting
      C.r.a.z.y.
      C.r.a.z.y.