Go Down

Topic: I am new to dweet.io and need help sending ip address (Read 381 times) previous topic - next topic

firelife15

When I look at my serial monitor and get the correct ip address printed and start up and then when it calls to send over dweet.io I get some crazy off the wall number.  Do I need to convert ip to a string?  Any help would be greatly appreciated.

I get the following:
POST /dweet/for/RSSI?RSSI=-39&ip=2601125386


Code: [Select]
// if there's a successful connection:
  if (client.connect(server, 80)) {
    Serial.println("connected");
    IPAddress ip = WiFi.localIP();
    long rssi = WiFi.RSSI();
   
    // Make a HTTP request:
    String s = "POST /dweet/for/RSSI?RSSI=";
    s.concat((int)rssi);
    s.concat("&ip=");
    s.concat(ip);
    Serial.println(s);
    client.println(s);
    client.println("Host: www.dweet.io");
    client.println("Connection: close");
    client.println();

rw950431

Perhaps this thread may help?  https://forum.arduino.cc/index.php?topic=228884.0

IPAddress is an array so probably doesnt sensibly convert to a string directly.

Go Up