Hi all,
I would like to build an Adroid app (with MIT App Inventor) to send and receive some data to and from an Arduino project i have running. I have some ESP826-01 WiFi boards wich i would like to use for this communication.
I woud be happy to use this in my local WiFi network for now, but eventualy i would like to be able to communicate with the Arduino through the internet. But i guess that is a problem for later on.
The probem i have is that i know a bit of electronics, i can program the arduino (with help of tutorials and examples) and i can program a bit in MIT App Inventor (again with help of tutorials and examples). But i'm not able to set up the ESP8266-01 to do the job i need, i just don't know where to start or what the best approach would be.
I have done a lot of searching forums and google and there is a lot of information out there, i have made some progress but i seem to be stuck at the moment (probably using the wrong things to search for)...
So far i have things working one way (from the Arduino to the Android app) but i have no clue how to get some data back from the Addroid app to the Arduino. Again this is probably because i'm using the wrong methode or i am overthinking the whole thing.
At the moment i have the ESP8266 connected to anArduino Nano (clone) , i have the Arduino set up a webserver on the ESP8266 andd send a plain text http page to the ESP8266. When i open the webpage on my laptop i can see the string i send and in the Android app i can read that string and display it there. I'm just not able to have the Android app change the web page on the server so the Arduino can get the new data (if this is possible at all).
For this i used the "Webserver" example from the "WifiEsp" library, i have only remarked out most of the webpage so i can send just the plain text.
The Arduino project is a chicken coop door.
There is one LDR and when it gets dark enough, the door closes, the next morning the door opens when it is light enough. There are 3 led's for door open, door closed and door error.
I would like the Android app to be able to show me if the door is open, closed or in error and the current vallue of the LDR and the LDR-vallue i have set to close the door.
Then i would like the Android app to be able to send the command to manualy close or open the door now and set a new vallue for the LDR for when to close the door.
So i think i need the Arduino to send 4 and receive 3 variables to the android app and the other way around for the Android app.
I think i can just send and receive 1 string back and forth with all variables in there like (1:25:364) and cut them up in the code of the Arduino and Android.
I have no experience with wireless communication or internet protocall (if i'm using the correct words here?!?), exept for a very simple and basic HTTP webpage i once made many-many years ago. So i think i'm overthinking this problem and there should be a much simpler solution for this.
Can someone please point me in the right direction to set up things to be able to send and receive data at both ends?
Maby give me some keywords to use to search for a solution?
I did find some solutions for this but they all use a cloud service or something but i do not want to depend on exteral services if this can be avoided.
Thank you for reading this and if you need any more information or details, please let me know.