It's connected Okay I can use "AT" commands without a problem, now I want to add some LEDs or Relays on the Arduino Uno then control them Via Wifi from web or a phone app like this:
After installing the library you will find an example sketch at File > Examples > WiFiEsp > WebServerLed that demonstrates how you can control an LED over WiFi. Using that as a reference it should be quite easy for you to expand it to multiple LEDs, etc.
pert:
I like to use the WiFiEsp library for this: GitHub - bportaluri/WiFiEsp: Arduino WiFi library for ESP8266 modules
After installing the library you will find an example sketch at File > Examples > WiFiEsp > WebServerLed that demonstrates how you can control an LED over WiFi. Using that as a reference it should be quite easy for you to expand it to multiple LEDs, etc.
Khorne:
I used the 3.3V output from the Arduino board, as you can see in the picture I didn't use the 5V output.
It is not just the power you need to care about but also the other pins.
As Whandall states above, the ESP8266 RX pin is 3.3v and the Arduinos TX pin (D11) is 5v. This needs bringing down to 3.3v. A simple voltage divider made from 2 resistors will do. I generally use a 1K and a 2K.
The Arduino will see 3.3v as HIGH, so you can connect the ESP8288 TX directly to the Arduino RX.
MartynC:
It is not just the power you need to care about but also the other pins.
As Whandall states above, the ESP8266 RX pin is 3.3v and the Arduinos TX pin (D11) is 5v. This needs bringing down to 3.3v. A simple voltage divider made from 2 resistors will do. I generally use a 1K and a 2K.
The Arduino will see 3.3v as HIGH, so you can connect the ESP8288 TX directly to the Arduino RX.
Thanks, I forgot about that, because I just tried some other tutorials I've seen before, but I couldn't find what I'm looking for yet. I'll try using a voltage divider or level shifte.
MartynC:
The Arduino will see 3.3v as HIGH, so you can connect the ESP8288 TX directly to the Arduino RX.
I guess you mean TX to TX, RX to RX. The Arduino is marked opposite to what each pin means.
I tried with 10k+20k resistors instead according to an example, and without the 8266 connected there's a 3V3 signal from the MCU, but with 8266 connected, the port marked RX on the 8266 is steady 1V2. Weird indeed.
Since nobody has said it, and this is coming up high in Google results for powering ESP8266, I'm reviving this old thread to point out that you cannot connect the ESP8266 to the 3.3v output of the Arduino. It draws far too much current. This will cause damage. Power it separately. Also, it is perfectly fine to provide 5V signal to the RX on the 8266. This was confirmed by the Espressif CEO Teo Swee Ann.
For not much money, you can get a small adapter board which will power the esp8266 from a 5v supply, and it connects to the uno tx,rx, 5v, gnd lines. With a bit of fiddling with connecting leads, you can use it to flash the esp8266, too. Search for "Ils ESP8266 Serial WI-Fi Wireless ESP-01 Adapter Module 3.3V 5V Compatible for Arduino". Makes it safe and easy for prototyping.