You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Thanks for the explanation - very neat graphs as well!

    For motion, did you consider sending a byte value that increments when there is motion? That way you'll always know if there was motion, unless you manage to miss 256 packets in a row!

    Also, by removing the name (see http://www.espruino.com/Reference#l_NRF_­setAdvertising) you can get a little bit more space for advertising data.

    With a bit of care you could probably convert all your readings into bytes (ranged 0 to 255) and stick them all in one big characteristic:

     NRF.setAdvertising({
              0x2a00 : [motion,volts,light,temp,sensor]
          });
    

    Then decode it on the Pi - either my modifying EspruinoHub or maybe just with node-red.

    It'd be a lot more efficient than sending ASCII strings.

    The current method will work well though - but I wouldn't bank on getting the full 1 year battery life out of it :)

About

Avatar for Gordon @Gordon started