Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By RyanC
#36954 Hi there,
So I'm sure this is a question which is answered many times elsewhere, but the internet is so flooded with various sources, I'm having a really tough time wrapping my head around this. For instance, right now, I have working this sketch: https://gist.github.com/igrr/9ef4d5c74355503e3b1f . All is well, it's working fine, but I can only access it by typing the network ip if I'm on the same LAN. How do I go from this to, say, being able to move this servo while I'm at the library or wherever?
Thanks for the help
User avatar
By GengusKahn
#37062 Hi there, Port forwarding will work well but you need to set this up on each router for each device, then it gets complicated.

Us a simple post to Thingspeak then view data remotely rather than directly.......

This is posting the data from a DHT sensor and the System Vcc, View this very elegantly and simply via freeboard.io

Code: Select all// Use WiFiClient class to create Thingspeak Post
  WiFiClient client;
  if (!client.connect(hostts, 80)) {
    return;
  }
  String url = "/update?key=";
  url += thingspeak_key;
  url += "&field1=";
  url += pfTemp;
  url += "&field2=";
  url += pfHum;
  url += "&field3=";
  url += pfDew;
  url += "&field4=";
  url += pfVcC/1000, 3;
// This will send the request to the server
  client.print(String("GET ") + url + " HTTP/1.1\r\n" +
               "Host: " + hostts + "\r\n" +
               "Connection: close\r\n\r\n");
  delay(50);
  client.stop();   
User avatar
By RyanC
#37095 Hi there,

Thanks for the responses, they've been a good hint. Unfortunately, I'm pretty deep into code noob territory, and know virtually no programming thus far. Can anyone give me more of a step by step on how to go from this working code to accessing that code remotely? Failing that, can someone please point out any existing guide which might be helpful for arduino and the esp? The ones I've found have not been helpful for those using the arduino IDE.

Thanks again