Post topics, source code that relate to the Arduino Platform

User avatar
By ArnieO
#22150
vazquezjm wrote:Hi. Is there a way to use the Arduino to program the ESP and then monitor the serial data? I ask this because I don't have the module that looks like a FTDI?

Thanks!

Yes, you can use an Ardunio module, but it is strongly recommended to use a level shifter on the input (Rx on ESP side) line, as the 5V signal from the Arduino could kill the ESP.

Procedure:
1) Program the Arduino with an empty sketch. This ensures that it does nothing; we will only use the board as a connection.
2) Connect:
Rx on Arduino to Rx on ESP (via a 5V -> 3.3V level shifter!)
Tx on Arduino to Tx on ESP
GND Arduino to GND ESP
(This is the opposite of what you would normally do. The reason is that we connect the Arduino and the ESP in parallell, and nust use the Arduino serial interface)
3) Start a serial monitor on the Arduino IDE and select the right baud rate.
4) Power up
5) You should now see the ESP boot sequence in the Arduino serial monitor, and be able to send AT commands to it from the computer. You can also upload firmware to it using one of the several available tools.
User avatar
By ftheirs
#47365 Hi guys!

I'm new in the ESP8266 world and I want to make a small project with this MCU and MQTT protocol. I've chosen PlatformIO as my IDE and here comes my problem.

I want to use this MQTT library instead of PubSubClient since my broker uses mosquitto 0.15 and I cannot upgrade it. I'm not able to find where and what should I do to add the library to my project in PlatformIO. I tried to change in PubSubClient.h MQTT_VERSION_3_1_1 to MQTT_VERSION_3_1 but when I compile it changes automatically to 3_1_1 :(

Could you help me or give me some advices?

Many thanks!
Fernando