Arduino Forum

Topics => Home Automation and Networked Objects => Topic started by: Retaxx on Jan 22, 2019, 07:28 pm

Title: Nodemcu -> MIT App Inventor send Data
Post by: Retaxx on Jan 22, 2019, 07:28 pm
Hello everybody,

i have build a app with MIT app inventor. The app controlls a nodemcu ESP8266. In this app i can controll some relays. Now i would like to send data (temperature) from the nodemcu to the app. But i don't know what i have to do now. I searched a lot of theatrs in the internet since four days.


How do I have to write the program in Arduino? How do I have to build the right app in app inventor? Does anyone have suggestions?

I hope you can help me..
Title: Re: Nodemcu -> MIT App Inventor send Data
Post by: KASSIMSAMJI on Jan 24, 2019, 04:26 pm
ESP servers your phone app, esp can not send data to your app straight up unless you request for it

and this is where 'polling' comes in

 you need to periodically 'poll' to fetch data from the ESP

you could like send http://192.168.xx.xx/poll   to ESP every 2 secs may be, and ESP responds (echo) back

with event    server.send(200, "text/plain",message);

where as in 'message' you will be attaching your sensors data as string

in app inventor , you be using component  'Web.GotValue' to get the response
Title: Re: Nodemcu -> MIT App Inventor send Data
Post by: Retaxx on Feb 14, 2019, 08:37 pm
Okey thank you for your information. I'm sorry i connot understand u. I have now visit a lot off websites to get some informations. But i don't found the right one. Can u explain me this part again. Can you make a example?

It would be very nice.
Thank you very much

kind regards
Title: Re: Nodemcu -> MIT App Inventor send Data
Post by: KASSIMSAMJI on Feb 14, 2019, 09:29 pm
see these