Hello, I wanna start by saying that I am totally new to the arduino world. I have no electrical engineering knowledge whatsoever (or at least greater than a high school student).
I do have basic knowledge in programming in java, python and c# and have created several applications in the past.
I bought my first arduino a few days ago because I had a particular project I need to accomplish for personal use, involving getting some measurments from some sensors and then sending them to a Firebase which would then be accessed by an android app.
Long story short, I bought my sensors, an arduino UNO, a breadboard, some wires and an ESP8266-01 wifi module and started building.
I got the sensors all connected and working fine and then came the time for my module to connect my board to wifi and send my data to the firebase.
It has been two days now that im trying to make this work and im at my wit's end. What is the right wiring?
I have seen more than a dozen of different wirings online and none of them works for me. I now understand that this module is actually a complete microcontroler and not the wifi adapter/antenna I thought at start, but can I not use it for the same purpose? Is there a different wiring for each case?
Do I need to connect to the RX,TX pins for the communication or the digital ones?
I see some people using resistors to the 5V ,others use external power supplies just for the module and some just plug it into the 3.3V (like I have). Do I need to programm the module board or can I simply use it as an adapter which my arduino will use to push my data?
Do I upload my sketch code to my arduino or to a Generic ESP8266 Module?
A few information of what I have tried so far:
I have tried and succeded to connect to my WiFi with the use of AT commands although I get "invalid" as status when run the AT command and I get spammed with unreadable characters (like reverse questionmarks in a triangle) all the time.
I have installed ESP8266 Boards as well as the latest Arduino Boards, the firebase library and the ArduinoJson library.
I get errors like
esptool.FatalError: Failed to connect to ESP8266: Invalid head of packet
when I try to upload to the module and
Compilation error: ESP8266WiFi.h: No such file or directory
when I try to include my wifi commands to the arduino directly.
Thanks to anyone who spent time reading this and sorry for the size of this.
There are a couple of ways you can use that module. Assuming it has the AT firmware installed, you send it AT commands via serial... it sounds like you almost got this working. Can you show how you set every up (a drawing of the connections), the code you run on the Uno, and the results you see in the serial monitor.
Nevertheless, when it is connected like this I understand that I cannot upload code to my arduino because the reset pin is connected to the gnd. So I just try some basic AT commands on my serial monitor in which I get spammed a weird character as soon as I open it.
2nd boot version : 1.4(b1)
SPI Speed : 40MHz
SPI Mode : DIO
SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000
�an't use rtc mem data
rl��sl��
Ai-Thinker Technology Co.,Ltd.
invalid
������WIFI CONNECTED
WIFI GOT IP
And then keep getting spammed by squared questionmarks. What have I accomplished so far and why does it say "invalid" in the end?
At that point I should mention that I do get an AI-THINKER_D8D017 object showing up on my wifi network.
That might simply be because ESP is connected to hardware serial and you just need to disconnect while uploading. I believe this applies to anything operating on hardware serial because of the shared UART. No comment on the reset's involvement, because I don't understand your intention there. That particular wire looks suss though.....
Note also ESP is a 3.3v device and you need a voltage divider in the Arduino Tx line. I understand this is essential, not optional.