-->
Page 1 of 1

Need guidance on project

PostPosted: Sat Jul 18, 2015 1:42 am
by Mike Bedford
Hello all,

I am building a sensor network. Currently, I have a temperature probe that is connected to an Arduino Due. These are existing. I now want to add the ESP8266 on top of this existing configuration to then allow me to have the ESP8266 and/or Arduino Due connect to a website to send the temperature results every x minutes. Since the Due has 3 serial ports, I have connected the ESP8266 to Serial1 on the Due. After the ESP8266 has a connection to an AP, I can then have it attempt to send my temperature data to my website on the internet.

Here is the first question. Yes, you can now program the ESP8266 directly using Arduino IDE which is great as that is what I am familiar with. However, I don't know that I need to program the ESP8266 directly or just do everything (serve webpages and data) from the Arduino and just send it over to the ESP8266. In other words, should I put the webserver/webpage directly on the ESP8266 or put it on the Due and have the Due then just send AT commands to the ESP8266?

Second thing, I really want to run the ESP8266 as AP and a client. I know it can do this but I have this vision (maybe somebody has already done this but couldn't find it) where you can connect to the ESP8266 AP and have an open connection with a known SSID along with a default/known IP address. You can then use the browser/IP to pull up a webpage. Again, not sure whether it is best to serve this from the ESP8266 directly or from the Due. But the idea then is the webpage will list available APs for the client to connect (ie AT+CWLAP) to AND allow you to configure the SSID and password for the ESP8266 client to connect to an AP. In other words use the AP mode to serve a page that will then allow you to configure the client to connect to your wifi. This will make setup in the future so easy as you would just have to apply power, connect to the AP and pull up the webpage to then find available APs to connect to and configure it to connect from the page!

Sorry, I know that was long winded but just want to make sure I explain the help I need and I am new to this device.

Thank you in advance for help/suggestions!

Mike

Re: Need guidance on project

PostPosted: Sat Jul 18, 2015 9:17 pm
by kenn
A large percentage of ESP8266 users (myself included) seem to have made remote temperature monitors as their first project, using just the ESP8266. It must be the 'Hello World' of IoT projects. ;) . Just about every ESP8266 framework includes some kind of web client example that barks out the temperature at a set interval. So there's no need to use an Arduino just to make a basic wifi remote sensor.

Likewise, having the ESP8266 initially run as a webserver, providing some kind of friendly configuration form, is also high on everyone's list, and most frameworks have an example of this. I believe that even the AT firmware has some standards for that: the AP is named something like 'ESP8266' plus the MAC address, the password is something like '12345678' (can't remember, too lazy to look), and the server IP is 192.168.4.1.

Since you're familiar with Arduino, check out the Arduino port to ESP8266 as discussed elsewhere on this site, and also Sming (my favourite) which uses Arduino libraries.