Navigation

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

    Topics created by pawel

    • pawel

      valuses form mysensors to own web page.
      General Discussion • • pawel  

      2
      0
      Votes
      2
      Posts
      930
      Views

      Jan Gatzke

      Don't know about the others, but openHAB has a REST API and is able to draw nice charts as a picture which you can embed in your web page.
    • pawel

      Eeprom usage
      General Discussion • • pawel  

      7
      0
      Votes
      7
      Posts
      6426
      Views

      bisschopsr

      Hi All, Resolved this with a simple funtion splitting the value in byte long parts. Bit shifting and OR are a perfect fit for this :-). The code: void storeEeprom(int pos, int value) { // function for saving the values to the internal EEPROM // value = the value to be stored (as int) // pos = the first byte position to store the value in // only two bytes can be stored with this function (max 32.767) gw.saveState(pos, ((unsigned int)value >> 8 )); pos++; gw.saveState(pos, (value & 0xff)); } int readEeprom(int pos) { // function for reading the values from the internal EEPROM // pos = the first byte position to read the value from int hiByte; int loByte; hiByte = gw.loadState(pos) << 8; pos++; loByte = gw.loadState(pos); return (hiByte | loByte); }
    • pawel

      repeater and sensor in one node.
      General Discussion • • pawel  

      4
      0
      Votes
      4
      Posts
      1457
      Views

      hek

      Yes, that should do it. And yes you shouldn't use delay() or sleep the node. Instead you use timer or your own millis() checks.