Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Arduino Uno and ESP8266. I want to connect and control an LED from a web server. I made a connection referring to this:

enter image description here

I uploaded the WifiWebServer code to the Arduino, and applied my router's credentials.

char ssid[] = "Router SSID";      // your network SSID (name) 
char pass[] = "Router's WPA Password"; `

I'm getting a "Wifi Shield not present" message from the Serial Monitor. I even tried giving external 3.3v power supply to my ESP8266 module, but no change. What am I missing here? Can someone help me fix this issue?

share|improve this question
    
The WifWebServer isn't compatible with the ESP8266, look up example code for the ESP8266 in stead. – TheDoctor Dec 26 '15 at 20:37
    
Yes, I looked up ESP8266 samples, sounds like we need to have FTDI to load WifiWebServer into ESP... Is there any other way to load Wifiserver into esp directly without FTDI? – ABI Dec 28 '15 at 5:28
    
Actually I made a mistake assuming esp8266 itself can act as a Wifi-Shield when it is connected with Arduino Uno, But it won't. So we can't use any Wifi shield examples for Arduino with esp8266 – ABI Jan 6 at 5:09
up vote 1 down vote accepted

From your diagram, you appear to be using an ESP8266-01?

Another ESP8266 AT command library that may be of interest/use.

Note that the AT command libraries are very dependent on the version of the firmware that you have on the device. Depending on when/where you bought the device, this firmware will vary significantly. I've not had any of the libraries work correctly with current versions of the firmware.

Run the AT+GMR at command (using your serial terminal) to determine the firmware version. If you're on Windows/PC updating the firmware to a previous version (the 0.9.x.x range seems to be the most stable according to my research) is relatively straightforward. If you're on Mac, it's not as straightforward...

Official/current release of the firmware is available from Espressif's Github repo.

There are plenty of directions on the net for getting firmware onto the ESP8266 for both Mac and Windows/PC. YMMV as to their accuracy/ease of use.

Note that different versions of the firmware default to different baud rates. Some default to 115200, others to 9600. If you decide to use SoftwareSerial (rather than Serial, which your diagram suggests is what you're currently using) you'll need it to run on 9600. I've not personally tested what Serial supports up to (but my understanding is that you can run up to 115200). Note that there are different commands for setting the ESP8266 AT command firmware baud rate depending on the firmware version/supplier. The official SDK uses the AT+IPR=9600 command. This stores the baud rate to the device (i.e. you don't need to send it every time, just once and it's then persistent).

If you haven't already, I'd recommend you get the system working with a simple serial terminal program (CoolTerm, for example) before getting into Arduino-land.

Note that the ESP8266 does not reliably run from the 3v3 power rail on the Arduino. The ESP8266 requires up to 300mA, the Arduino is capability of around 50mA to my understanding. Symptoms of insufficient power include random resetting of the device. Best to run a separate 3v3 source to the ESP, or if you have a strong enough 5v supply, use a step-down converter. Your diagram indicates you're using a standard Arduino, which runs 5v out of the serial pins (or digital outs), but your comments indicate you're running 3v3 (which means you're probably running a 3v3 Pro Mini or similar)? If you're not running a 3v3 device, you'll definitely need to run a 5v-3v3 logic level converter (I can't link to examples due to not having enough reputation points—but these are relatively easy to get from SparkFun or similar. I picked up a combined step-down converter with logic level converter which does both tasks.

Lastly, If you don't need the ADC from the Arduino device for your application (which it sounds like you don't given your project description) I'd strongly recommend you reconsider the advice from gmag11 and yeti re: running Arduino on the ESP8266. It is much more stable, and the extra SRAM will make a big difference with processing/building HTTP request strings etc. I wasted a lot of time (unsuccessfully) trying to get AT commands working before switching to Arduino on the ESP8266, which has been a breeze by comparison.

share|improve this answer

You can program and upload code to ESP8266 using Arduino programming environment, reusing code and libraries with small changes. Check https://github.com/esp8266/Arduino for more information.

For most tasks ESP8266 may substitute Arduino board completely. It has more flash, more RAM and integrated WiFi, and is faster (80MHz).

share|improve this answer

The WiFiWebServer tutorial describes how to use the ArduinoWiFiShield. This shield is based on different WiFi hardware than the ESP8266 modules.

You need a WiFi library driving the ESP8266 modules instead, e.g WeeESP8266.

Your favourite internet finding machine sure will find lots of similar libraries.

A different approach would be ArduinESP (https://github.com/esp8266/Arduino), which means to develop code to run on the ESP8266 module directly.


...aaaand please rethink your wiring. The ESP8266 modules are a pure 3.3V pets and your wiring connects a 5V logic signal directly to the ESP8266 and this may send your ESP8266 into the digital heaven with or without waving goodbye using blue smoke...

share|improve this answer
    
Have ESP8266 library in my arduino & connected with 3.3V only, I don't want to directly upload firmware into ESP8266, but via Arduino Uno. and Wifi Shield is different from ESP8266 module. I use esp8266 only – ABI Dec 22 '15 at 8:47

Here is how to send commands to an ESP8266, without using an FTDI Programmer (NOTE: the IC used is LM117 (5V to 3.3v) IC for level shifting.)

ESP8266 connection diagram

share|improve this answer
    
Wait, it does not shift anything else than 5V to 3.3V. You have to shift other pins too. – Avamander Feb 9 at 20:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.