ESP8266 Web Server POST Requests With JSON Data In Arduino IDE (Mac OSX and Windows)

preview_player
Показать описание
• Your support helps me post videos more frequently:
BTC: 1ZpLvgETofMuzCaKoq5XJZKSwe5UNkwLM
==========
• Find me on:
==========
• My shops:
==========
• Description:
One of the most common tasks when using the ESP8266 is setting it up as a device that connects to a network and responds to traffic on it (i.e., a web server). I wanted to show you, in detail, how to take things further by using the web server to receive custom data formatted in JSON and included inside of a POST request.
==========
• Project parts:
ACROBOTIC Development Board for ESP8266:
ACROBOTIC Pan and Tilt USB Camera Mount:
==========
• Project code:
Firmware for the Arduino IDE:
Install curl (Mac and Windows):
==========
• Tutorials:
Detailed guide for getting started with the ESP8266 Development Board:
==========
• Music:
==========
#ESP8266 #Arduino #Tutorial
Рекомендации по теме
Комментарии
Автор

Hey guys, anyone new coming into this video please note that the ArduinoJson library has updated to version 6. With that, the Parse method has been replaced with a document method.
New code is as follows:
String data_string = server.arg("plain");
StaticJsonDocument<400> jDoc;
DeserializationError err = deserializeJson(jDoc, data_string);
JsonObject object = jDoc.as<JsonObject>();
const char* pan = object["pan"];
const char* tilt = object["tilt"];
Pan = pan;
Tilt = tilt;


At least this is what I have used with success.



Good luck

briansauerborn
Автор

What i like most about this channel is that the videos are made simple and very easy to understand. Rather than throwing too many things at us in one go (which is only going to confuse us more and leave us frustrated), the videos are sequenced in a manner that allows us to learn step by step in an incremental fashion making life much easier for a beginner like me. I thoroughly enjoy your videos and wish to see more of them. Thank you!!

pavankumar-ffbozcy
Автор

I just discovered your video series. I am new to the web side of micro-controllers, your commentary and interactive coding certainly filled in a number of blanks in my quest to understand IOT communication. Very well done thank-you.

carltone
Автор

Very useful and well presented. Thanks!

capiberra
Автор

Another great, clear, helpful tutorial! Thanks! I also would like to see a tutorial where two ESP8266's communicate -MQTT would be an added bonus using an MQTT broker such as a Raspberry Pi.

quaternion-pi
Автор

Thanks for video training
I have problem in my project I used arduino uno with esp8266 node Mcu to measure two analog PH& Turbidity I check first code of arduino uno in serial I get the result test of 2 sensors how can I program arduino uno and node mcu in that 2 sensors to get result on web will write the program for arduino uno and esp8266 node mcu thanks

abdulsalamfasialshtiway
Автор

Excellent tutorial! I'm eager to try it out!

pepper
Автор

you think, not using colored coding and choosing complex name is cool ?

navidrct
Автор

Very nice but for future leave view on code for most of time, please. Only time you have to change view is when you show us reaction of the devices controlled by the program. At any other moment i would like to read and analyze code instead of watching you:P BTW your english sounds pretty clear, one of the few that I am able to understand without focusing too much on understanding

grankeee
Автор

I got a message "StaticJsonBuffer not declared in this scope". I had installed ArduinoJson by Benoit Blanchon version 6.7.0-beta. When I changed library to ArduinoJson version 5.13.14. (Sketch > Include Library > Manage libraries, search for Arduino Json) the sketch compiled without any errors. I thought this information might help other users of this video.

ezio
Автор

Can we upload the code to Arduino instead of the esp module, and then connect the esp to Arduino board?

jeanchrinot
Автор

Hey I've been following your other videos. I got one with a websocket to work. Question is which would have a better response? A websocket or json? I'd like to build a robot car.

HeliosFirell
Автор

I'm really happy that I've found your channel. I'm working on a project and I'd like to contact you for some questions, would it be possible? Thanks in advance and keep up the good work!

link_z
Автор

Hello sir, Thank you very much for all your tutorials but i couldn't watch all them yet because lack of time, So i want to ask you a quick question about my graduation project. I hope you can help me :)

In my project i should use 3 Things, (Raspberry Pi 3 ) as a Server, WeMoS D1R2(will managed by server) so it will "turn on" or "turn off" the light bulb according the server input and Android Phone(I will create an Application to send request to Raspberry Pi 3 Server like "turn on the light in the room 1") and basically i have to create my home server.

So i tried to create a server on the Raspberry Pi using (ExpressJS and mongoDb) and i made it. But i am not sure how to manage WeMoS using that server and i thought i can create my API and i can provide real-time JSON object to the wemos so it can read the status of the light and according to that value it can do its job as like as below.

{ _id:1, status: 'on', image_url: '/open_light.jpg', redirect_url: 'Close Light', redirect_status: 'off' }

So my question is, Is there any other good way to mange wemos using raspberry pi 3 server if not then how to parse JSON object from external web server ?, Because my server will run on Raspberry Pi. So i hope you can help me sir :) Thank you very much.

denemedeneme
Автор

thank you, excellent tutorial.
could you please do another tutorial for sending the commands from another esp8266?

Ahmedyashar
Автор

why not just use pan = server.arg("pan"); and tilt = server.arg("tilt");

CShand
Автор

Hi Cisco, you are doing a great job your videos are really beneficial. I was wondering how is it possible to control the servo if the user and ESP8266 both are on different networks?

aliee
Автор

i have an esp 8266 and a i2c 16, 2 lcd, i have made a text box thats suppose to display the user input to lcd screen but i dont know how to grab that user input and put that data inside a variable for displaying on lcd with the lcd command, it sais filenot found on the actual lcd display so im half way there how do i use the posted user data? without using any sd card!

Автор

Great video, is it possible to use just AT commands to Post to a website in JSON format without reprogramming the ESP8266, thanks!

עמודרע
Автор

Hi, Im trying to use serial.print to print the data in the JSON but i dont get any data with the arduino. When i enter to the url the function is executed.

manolocapilla
visit shbcf.ru