Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By zebrone92
#31647 Hi everyone,
I'm going to explain my situation. I have the WiFi card ESP8266 ESP-01 with firmware AI-thinker versione 0.9 and I want to install on Arduino this software:

Code: Select all
/**
 * @example ConnectWiFi.ino
 * @brief The ConnectWiFi demo of library WeeESP8266.
 * @author Wu Pengfei<pengfei.wu@itead.cc>
 * @date 2015.03
 *
 * @par Copyright:
 * Copyright (c) 2015 ITEAD Intelligent Systems Co., Ltd. \n\n
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version. \n\n
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
#include "ESP8266.h"
#include <SoftwareSerial.h>

#define SSID        “MyWiFiNetwork”
#define PASSWORD    “Password”

SoftwareSerial mySerial(3, 2); /* RX:D3, TX:D2 */
ESP8266 wifi(mySerial,115200);

void setup(void)
{
    Serial.begin(115200);
    Serial.print("setup begin\r\n");

    Serial.print("FW Version: ");
    Serial.println(wifi.getVersion().c_str());
   
   
    if (wifi.setOprToStation()) {
        Serial.print("to station ok\r\n");
    } else {
        Serial.print("to station err\r\n");
    }

    if (wifi.joinAP(SSID, PASSWORD)) {
        Serial.print("Join AP success\r\n");
        Serial.print("IP: ");       
        Serial.println(wifi.getLocalIP().c_str());
    } else {
        Serial.print("Join AP failure\r\n");
    }
   
    Serial.print("setup end\r\n");
}

void loop(void)
{
}




Due to the fact that Arduino can't supply correctly the voltage to the card, I'm using this http://www.miupanel.com/Wi-Fi-Module/ACCESSORIES/-BREADBOARD-ADAPTER and the connection are:

VCC 5 Volt -> +
GND -> -
D3 -> RX
D2 -> TX

When I run the software I face this error:

setup begin
FW Version:
to station err

I've tried different cards, so no one of them are damaged. Why am I facing this problem ? Are there any errors ? Thank you in advance for your support.
User avatar
By mrburnette
#32120 @zebrone92:
Due to the fact that Arduino can't supply correctly the voltage to the card, I'm using this http://www.miupanel.com/Wi-Fi-Module/AC ... RD-ADAPTER


Oh, I'm NOT a fan of that adapter.
The issue is not the ESP8266 at 3.3V but the Arduino at 5V.

While Arduino's such as the Mini are normally 5V, there are some manufactured for 3.3V:
https://www.sparkfun.com/products/12587
BUT
this is also a great way to solve the interface problems:
http://www.kr4.us/Logic-Level-Converter-Bi-Directional.html
Similar to the above, these adapters can be purchased for around 2-for-$1 from China.

Now, while 16MHz Arduino mini boards are intended to run from 5V, 99.9% of the time, they will run just fine from a well filtered 3.3V power supply. You would not want to sell a project using a 5V mini running at 3.3V, but for lab experiments or home projects (where the temperature is not extreme) you can get away with the 3.3V for everything. Makes life easy.
Mini's are available for under $2:
http://www.aliexpress.com/item/Free-Shipping-1pcs-lot-ATMEGA328P-Pro-Mini-328-Mini-ATMEGA328-5V-16MHz-for-Arduino/32340811597.html

Ray
http://www.hackster.io/rayburne