1

I have an arduino Uno which collect data from sensor, i want to send this data to the cloud using wifi esp8266 who support SSL using the library WifiClientSecure, is there an alternative to send data from arduino to the esp card and esp8266 read this data and send it after that to the cloud, i'm able to work with mqtt but i want to know if there is a way to have a directly connection between the arduino uno and esp8266 without having a third part, any help will be gratefull.

4
  • You did not mention which ESP8266 board you are using, but as long as it has a USB port and several GPIO (for example, not the ESP-01), you are able to program the ESP itself in the Arduino IDE. That way, it can read sensor data itself AND send it to the cloud (no Arduino Uno needed). If your hardware supports it, I can post an answer with (hopefully) more detail Commented Sep 5, 2017 at 14:15
  • I'm using Esp8266-01 that's the problem and must using arduino uno because of what he offers with his lot functionality, i read some documentation and i see that we had to use an FTDI to upload the software directly to the esp8266. Commented Sep 7, 2017 at 12:01
  • A few more questions: When you say "esp card", do you mean "SD card" or the ESP8266 board? Can you please clarify what the "third part" is that you want to eliminate? Right now I see your setup as looking like: Arduino --serial--> ESP8266 -> cloud. Is this correct? Commented Sep 7, 2017 at 13:26
  • yes i mean esp8266-01 board, and i want to send data coming from sensors with arduino uno to the esp8266, i read that i must send it using serial, so after that the esp board will send data to the cloud using wificlientsecure.The third part is that using a server to send data with mqtt and after that the esp take data from server with pubsubclient. Commented Sep 7, 2017 at 13:46

1 Answer 1

1

According to my research, the ESP8266 AT Command API does not support SSL. This means you will need to use the Arduino (as an FTDI converter) to program the ESP8266 with custom firmware. This will enable you to use WiFiClientSecure and pubsubclient.

To use the Arduino as an FTDI:

  1. load a sketch that does not use Serial, such as the "Blink" example
  2. connect the Arduino's TX pin to the ESP8266 RX pin
  3. connect the Arduino's RX pin to the ESP8266 TX pin

Now you need to setup Arduino IDE so it can program an ESP8266

  1. In Arduino IDE -> File -> Preferences, paste this into the Additional Boards Manager URLs: http://arduino.esp8266.com/stable/package_esp8266com_index.json (just copy the link as it is instead of clicking)
  2. go to Tools -> Boards -> Boards Manager. Find "esp8266" in the list of boards and click "Install"
  3. Set your board to "Generic ESP8266 Module" in Tools -> Boards

Arduino IDE is ready! But before you caan program an ESP8266 with it you need to connect a reset button and a program button to the ESP8266.

  1. connect a push-button between GND and the ESP8266 GPIO_0 pin
  2. connect a push-button between GND and the ESP8266 RESET pin
  3. add a 10K-ohm pull-up resistor between 3.3V and ESP8266 pin (defaults the reset pin to HIGH)

When you are ready to upload a sketch to the ESP8266, use those buttons like this:

  1. press both buttons
  2. release RESET button
  3. release GPIO_0 button

This puts the ESP8266 in program mode! You should now be able to click the "Upload" button in Arduino IDE. I would suggest using one of the provided ESP826a6 example sketches (like this one) to test everything out.

Here's an overview of the project:

. Arduino Uno sketch: read sensor data, send via Serial to ESP8266 . ESP8266 sketch: connect to WiFi network, receive sensor data from Serial, send via WiFiClientSecure to the cloud.

I will leave the actual code of these two programs up to you, but if you get stuck just leave a comment. Hope this helps!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.