M5Stack LoRa and ThingSpeak



  • Hello,

    I am trying to upload data to thingspeak that is being received from the LoRa Unit via Arduino, but so far all I have been able to upload are data that is irrelevant.

    The Arduino example shows that on the receiving end of LoRa, there is a line where the M5 read the packet sent, but simply uploading the said packet does not work, and ends up with 48/50.

    Said Code section is :
    while (LoRa.available()) {
    char ch = (char)LoRa.read();
    Serial.print(ch);
    M5.Lcd.print(ch);
    int x = ThingSpeak.writeField(myChannelNumber, 1, ch, myWriteAPIKey);
    if(x == 200){
    Serial.println("Channel update successful.");
    delay(10000);
    }
    else{
    Serial.println("Problem updating channel. HTTP error code " + String(x));
    delay(10000);
    }

    Is there anyway to upload that data? Thanks!


  • M5Stack

    i have not idea. we never try upload data to thingspeak before. and share your application logic and your actual use functions . maybe another people can help you. thanks



  • So, I have 2 m5stack core with me.

    My idea is to have these 2(or potentially more) to communicate with each other via LoRa, one to be a sensor node, and another acts as a receiver.

    The receiving node will then upload the data received from the sensing node to thingspeak.

    The components used in this system is the ENV sensor, and the LoRa modules.

    I hope this explains what I am trying to do.