Navigation

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

    Topics created by martins

    • martins

      Serial Gateway
      Troubleshooting • • martins  

      8
      0
      Votes
      8
      Posts
      1530
      Views

      gohan

      Try older boards definitions like 1.6.11 or .13
    • martins

      Serial Gateway crash and reloads
      Troubleshooting • • martins  

      18
      0
      Votes
      18
      Posts
      3434
      Views

      Jan Gatzke

      @martins Did you ever find a solution for this? I am facing similar problems with the serial gateway: https://forum.mysensors.org/topic/6684/serial-gateway-restarting/13
    • martins

      Pass RFID UID tag to Domoticz
      General Discussion • • martins  

      2
      0
      Votes
      2
      Posts
      1593
      Views

      AWI

      @martins try V_TEXT
    • martins

      RFM69H and RFM69HCW
      Hardware • • martins  

      4
      0
      Votes
      4
      Posts
      1747
      Views

      mfalkvidd

      W means that the module is for the world market. Without W is for the Chinese market, with less stringent quality rules (and therefore cheaper). C means the module is using different pins. http://www.hoperf.com/faqs/410.html Mixing H and HCW in the same network should work, provided the modules are wired differently (due to "C")
    • martins

      Sleep function breaks code
      Troubleshooting • • martins  

      6
      0
      Votes
      6
      Posts
      1641
      Views

      martins

      OK it's working. Main fix I think is I used the new 2.1.1 library and all comms to the RFM69 radio seems to be fixed. Current code: DESCRIPTION Simple binary switch example Connect button or door/window reed switch between digitial I/O pin 3 (BUTTON_PIN below) and GND. http://www.mysensors.org/build/binary */ // Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached // #define MY_RADIO_NRF24 #define MY_RADIO_RFM69 #define MY_RFM69_FREQUENCY RF69_433MHZ #define MY_IS_RFM69HW #if F_CPU == 8000000L #define MY_BAUD_RATE 38400 #endif #include <SPI.h> #include <MySensors.h> #define CHILD_ID 3 #define BUTTON_PIN 3 // Arduino Digital I/O pin for button/reed switch int oldValue=-1; // Change to V_LIGHT if you use S_LIGHT in presentation below MyMessage msg(CHILD_ID,V_TRIPPED); void setup() { // Setup the button pinMode(BUTTON_PIN,INPUT); // Activate internal pull-up digitalWrite(BUTTON_PIN,HIGH); } void presentation() { // Register binary input sensor to gw (they will be created as child devices) sendSketchInfo("Binary Sensor", "1.0"); // You can use S_DOOR, S_MOTION or S_LIGHT here depending on your usage. // If S_LIGHT is used, remember to update variable type you send in. See "msg" above. present(CHILD_ID, S_DOOR); // Send the sketch version information to the gateway and Controller } // Check if digital input has changed and send in new value void loop() { int value = digitalRead(BUTTON_PIN); #ifdef MY_DEBUG Serial.println("Sensor Value"); Serial.println(value); #endif send(msg.set(value==HIGH ? 1 : 0)); sleep(BUTTON_PIN-2, CHANGE, 0); } Thanks, Martin