I'm trying to connect my Arduino Uno to wifi using my ESP8266 12F. I found and tried 2 tutorials and instructables that use other ESP8266 boards, but none of them worked, and haven't found any example of how to do it with the 12F.
When you say it does not work does that mean not at all or some problem connecting?
initially try a WiFi scanner which is usually an example which comes with the library
how have you connected the ESP-12F ESP8266?
can you download your code?
I used it before on its own, and it worked fine, I could program it and connect to it with my phone and send command to it and get responses. Now the tutorials that I tried, since they say that "you don't need to flash the ESP8266, just the stock firmware", I used a brand new one.
looking at the specification of the ESP8266 12F in the datasheet it appears to be a 3.3V device (page 9) - have you used a level shifter between it and the UNO?
what baudrate did you use ? the default is 115200 (page 6)
the datasheet states on page 5 "General AT commands can be used quickly" but gives no details
Thanks for your continuing effort to help, I am super new to all this and appreciate it.
horace:
looking at the specification of the ESP8266 12F in the datasheet it appears to be a 3.3V device (page 9) - have you used a level shifter between it and the UNO?
I did not, however do I really need to? I'm not using the 5V pin of the Arduino Uno, I'm using the 3.3V pin of the Arduino Uno, as stated in both the tutorials that I linked in my original question.
horace:
what baudrate did you use ? the default is 115200 (page 6)
Thank you, but this is not what I'm trying to accomplish. This is useful information for programming the ESP8266 itself, but I am not trying to program the ESP8266:
From my first post:
knotanumber:
I'm trying to connect my Arduino Uno to wifi using my ESP8266 12F.
This is the same link that you sent in your last answer, and while informative, it uses the ESP8266 12F on its own, to program it on its own, but I am trying to use it to talk to wifi from the Uno.
knotanumber:
Thanks for your continuing effort to help, I am super new to all this and appreciate it.
I did not, however do I really need to? I'm not using the 5V pin of the Arduino Uno, I'm using the 3.3V pin of the Arduino Uno, as stated in both the tutorials that I linked in my original question.
if you connect the serial lines of a 5v device such as the Mega to a 3.3V device such as the ESP8266 12F a level converter should be used otherwise the 3.3V device may be damaged.
Some 3.3V devices, e.g. some PIC24s, have some input pins that are 5V toterant
the serial lines are the Tx and Rx signals
the resistors on the arduino Tx line are a potential divider which act as a level converter
converting the Arduino Tx 5V output to 2.5V for the ESP8266 Rx input
the ESP8266 Rx 3.3V output is connected directly to the Arduino Rx input
connected a ESP8266 12F to an arduino due (a 3.3V device therefore no requirement for a level shifter)
ran a simple serial program
// Arduino Due communicating with a ESP8266 12F
// Arduino Due 3.3V and GND to ESP8266 12F Vcc and GND
// Arduino Due Tx pin 18 to ESP8266 12F RxD0
// Arduino Due Rx pin 19 to ESP8266 12F TxD0
// AT commands https://room-15.github.io/blog/2015/03/26/esp8266-at-command-reference/
unsigned long time1;
void setup() {
while (!Serial) ;
delay(500);
// initialize both serial ports:
Serial.begin(115200);
Serial1.begin(115200);
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
time1 = millis();
// while(1) Serial1.print("hello");
Serial.write("ESP8266 12F Serial test\n");
}
void loop() {
// blink LED once a second
if (millis() - time1 > 1000)
{
time1 = millis();
if (digitalRead(LED_BUILTIN) == LOW)
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
else // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
//Serial.write('*');
}
// read from port 1, send to port 0:
if (Serial1.available()) {
int inByte = Serial1.read();
Serial.write(inByte);
}
// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
//Serial.write(inByte);
Serial1.write(inByte);
}
}
and AT commands worked OK
Serial test
at
OK
AT+RST
OK
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 27728, room 16
tail 0
chksum 0x2a
load 0x3ffe8000, len 2124, room 8
tail 4
chksum 0x07
load 0x3ffe8850, len 9276, room 4
tail 8
chksum 0xba
csum 0xba
AT+CIPSTATUS
STATUS:5
OK
AT+CWMODE=?
+CWMODE:(1-3)
OK
AT+CWJAP="xxxxxxx","yyyyyyyy"
WIFI CONNECTED
WIFI GOT IP