Navigation

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

    Alain Mizreh

    @Alain Mizreh

    0
    Reputation
    2
    Posts
    212
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Alain Mizreh Follow

    Best posts made by Alain Mizreh

    This user hasn't posted anything yet.

    Latest posts made by Alain Mizreh

    • RE: Can't find the right documentation... Reading receive messages

      @mfalkvidd , Thanks for your reply !
      Would there be some code example to illustrate ?
      I am bad at manipulating variables, and I don't get it...
      The link you gave me is very detailed, however, I don't understand what I should do with all the variables described... Create one local variable for every field ?

      Thanks a lot,

      Regards,

      Alain

      posted in Development
      Alain Mizreh
      Alain Mizreh
    • Can't find the right documentation... Reading receive messages

      Hello,
      First of all, I would like to say thank you for MySensors.
      It seems to be doing all the things I expected for a longtime, and I have been trying to do it all by myself before...

      So, I am new to MySensors, not to Arduino / ESP8266, etc...

      I have been able to make a Gateway & a Sensor talk together.
      I have been able to connect to my io.adafruit.com MQTT server, as well...

      I am using the "void receive(MyMessage &msg)" routine to read incoming messages from my Sensor (a DHT22 based one).

      But I cannot figure out how to get the data from it !
      The variable I use doesn't seem to be a String, and I am pretty sure I coud get something like : MyNode = MyMessage.NODE_ID... but I can't find the explanation of how to read incoming messages...

      Hint : I am a hardware engineer from 1985, and I developed my programming skills very late...

      Here is the bit of code I use :

      void receive(MyMessage &msg)
      {
      
        
        String MyMessage;
        int MsgLen = MyMessage.length();
        
        String Humid = MyMessage.substring(12, MsgLen);
        
        Serial.println(MsgLen);
        Serial.println (Humid);
        
      
      }```
      
      The result is that MsgLen (Length of MyMessage) = 0. So to me this is not a String... 
      
      Thanks for your help, 
      
      Regards,
      
      Alain
      posted in Development
      Alain Mizreh
      Alain Mizreh