So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By JohanF
#86837
AcmeUK wrote:Is there a technical reason why you are using the Arduino?

A suitable esp8266 like the NodeMCU has plenty of capacity to read sensors and send the data to an API.

There is a multitude of example scripts on the net.

Trying to use the AT commands invites a whole lot of headache!


The technical reason is I think Arduino is easy. Raspberry Pi is also an option, but it is to... Heavy for what we try to accomplish. Besides that, I have more experience with Arduino. It is also because of the costs; Arduino is cheaper.

So you have any tutorial that tells me how to accomplish the thing I want? Most tutorials I find are just bits and pieces.

What should I be using, if AT is a no go?
User avatar
By QuickFix
#86846 Oh wait a minute, now I get it: you're using an Arduino board to control an ESP with standard AT-command firmware. :shock:
You do know you can program the ESP with the Arduino IDE and C++ code using the Arduino ESP core (that's what a lot of this website is about)?
The only real drawback between a real Arduino board and an ESP8266 is the lesser amount of (usable) GPIO's, which can sometimes be a challenge. :idea:

The standard AT command firmware is indeed considered a useless piece of poep. :mrgreen:

Er gaat straks echt een wereld voor je open in deze Corona tijd. :D
User avatar
By JohanF
#86848 I think there is a misunderstanding between modules and boards. I can tell you everything about Azure, Microsoft development, C#, .NET Core, Angular and website development from A to Z. But Arduino, C++, Raspberry Pi and stuff is very new to me.

Let's start over...

I have this module:
https://www.hackerstore.nl/Artikel/439

I have connected this module to an Arduino UNO. On this board is a DHT 11, which monitors the temperature and humidity. This is for testing the whole path from the sensor to the API. If I figure this out, I can connect the other sensors, which are 4 different ones. All 4 sensors have to send the values to the Azure API. But I want to start.... Simple.

I am trying to post data to an API, which is hosted in Azure and accepts the following POST data:
sensorid = the_numeric_id
value = a_value

I have connected it, but I get strange chars in the serial monitor (see original post).

So, my question is:
Why do I get these strange chars?

But, thanks to the replies here, another question has arised:
How can I post the data from the ESP to the API without using the AT command?
User avatar
By AcmeUK
#86858 You are likely to get even more headache trying to use that board to respond to AT commands from your Arduino. Not impossible but not worth going there!

You will do better using either a esp8266 NodeMCU or a Wemos D1 Mini.

You will be able to read the DHT 11, and many other sensors, directly and send the readings to your API.

There are plenty of examples of reading sensors with both of these boards and plenty of examples of sending data to APIs such as ThingSpaek.

See here for an example of reading a DHT11 with a node MCU:- https://www.instructables.com/id/Interface-DHT11-Humidity-Sensor-Using-NodeMCU/

See here for an example of sending DHT11 data to ThingSpeak:- https://roboindia.com/tutorials/nodemcu-dht11-thingspeak-data-upload/

Both of the above links were found using Google and searching for esp826 DHT11 then esp8266 DHT11 ThingSpeak.