Connecting my arduino to wifi using a ESP8266 01 module

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. :heart_decoration:

You're being informed that you need to find that library and install it.
Arduino/ESP8266WiFi.h at master · esp8266/Arduino · GitHub

PE - but I think it's part of the Install
appdata\local\arduino15\packages\esp8266\hardware\esp8266
3.0.2\libraries\esp8266wifi\src

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.

This is what my wiring looks like. I found online and people said it worked for my purpose.

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.

exhibit a

exhibit b

This is what I get for running AT+RST:

AT+RST

OK

WIFI DISCONNECT

ets Jan 8 2013,rst cause:2, boot mode:(3,7)

load 0x40100000, len 1396, room 16

tail 4

chksum 0x89

load 0x3ffe8000, len 776, room 4

tail 4

chksum 0xe8
load 0x3ffe8308, len 540, room 4
tail 8
chksum 0xc0
csum 0xc0

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.

I did install the library directly from github although some said I woudnt have to cause it is already pre-installed.

What do these AT command return?

AT+UART_CUR?

AT+UART_DEF?

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.

After doing it the hard way... Why not just use a board that has WiFi already?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.