💬 MySI2CNode - Node for I2C devices, CR123 or USB powered





  • Sorry, probably something simple but when I enable DEBUG I get an error "'SLEEP_TIME' does not name a type" on the line "SLEEP_TIME = 15000UL; // If debug, TX every 15s"


  • Hardware Contributor

    My bad, please replace

    const unsigned long SLEEP_TIME = 1800000UL; // Sleep time between reads (in milliseconds)
    #if defined MY_DEBUG
    SLEEP_TIME = 15000UL; // If debug, TX every 15s
    #endif
    

    by

    #if defined MY_DEBUG
    const unsigned long SLEEP_TIME = 15000UL; // If debug, TX every 15s
    #else
    const unsigned long SLEEP_TIME = 1800000UL; // Sleep time between reads (in milliseconds), 30min
    #endif
    

    Corrected code will be uploaded in a few minutes.

    Thanks!



  • Thanks, that works. I had a lot of issues soldering on the radio, I now have 1 of 2 working getting node ID but it's still not sending any temp/hum data and I'm not seeing any errors.


  • Hardware Contributor

    Soldering the radio is the tricky part if you are using it with a battery holder as you need to solder it last. A fine tip on the soldering iron is a must.
    Before powering up, I would recommend using a multimeter in continuity mode and check every radio solder pads. Pads next to each other should not be in contact. You can also trace back each pad back to their respective arduino pin and see if you have continuity there.

    For temp/hum data it could be because of many things:



  • I spent a bit of time with a solder pump and solder wick getting rid of the bridges across the pads and I have no shorts but the one node refuses to connect.

    I'm using the si7021 sensor that's been tested on a test node I have set up. It's connecting and getting a node ID, sends the variable names and then seems to stop without any errors.

    4296 !TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=11,pt=0,l=25,sg=0,ft=0,st=NACK:Temperature Humidity node
    4343 !TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=1,st=NACK:2.0
    4352 MCO:SLP:MS=500,SMS=0,I1=255,M1=255,I2=255,M2=255
    4358 MCO:SLP:TPD
    4360 MCO:SLP:WUP=-1
    4403 !TSF:MSG:SEND,3-3-0-0,s=0,c=0,t=7,pt=0,l=10,sg=0,ft=2,st=NACK:Plants Hum
    4411 MCO:SLP:MS=500,SMS=0,I1=255,M1=255,I2=255,M2=255
    4417 MCO:SLP:TPD
    4419 MCO:SLP:WUP=-1
    4427 TSF:MSG:SEND,3-3-0-0,s=1,c=0,t=6,pt=0,l=11,sg=0,ft=3,st=OK:Plants Temp
    4435 MCO:REG:REQ
    4450 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
    4458 TSF:MSG:READ,0-0-3,s=255,c=3,t=27,pt=1,l=1,sg=0:1
    4464 MCO:PIM:NODE REG=1
    4466 MCO:BGN:STP


  • Hardware Contributor

    I see a lot of "!TSF" and "NACK" which seems to be radio communication problems.
    That's MySensors related and can be related to many things, from soldering problem to power / capacitor issues.

    In MY_DEBUG mode you should see your temp/hum printed on serial every ~15s so there is something wrong there, either wiring or a code issue.

    Ty with the example included with the library "i2c_SI7021.h", without any MySensors related stuff, to see if your sensor is detected. You should see temp/hum on the serial.



Suggested Topics

  • 8
  • 15
  • 13
  • 14
  • 1
  • 2
  • 24
  • 4

55
Online

11.4k
Users

11.1k
Topics

112.6k
Posts