Skip to main content
Bumped by Community user
Bumped by Community user
added 5 characters in body; edited title
Source Link
dda
  • 1.6k
  • 1
  • 12
  • 18

WiFi module ESP8266-01 for arduinoArduino not working

I am new to using arduinoArduino just bought my first one yesterday, and I also got an WiFi module. The "arduino" The Arduino I got is another brand but should be the same as the Arduino unoUno rev 3 and I got the ESP8266-01 wifi module.

I've tried doing some simple examples projects following some youtubeYouYube videos, and all onesthose have worked nowithout problem.

What I am trying to create is a simple magnetic door switch when its. When it's opened I get a signal to my computer. Getting Getting the magnetic door switch wired with the Arduino and getting aan LED to light up when the magnetic switch opened worked nowithout problem.

But to set up the wifi module, I cantcan't get it to work.

This is the instructionsThese are the instructions I am trying currently: https://github.com/Hieromon/ESP8266.

Video of my arduino setup: https://www.youtube.com/watch?v=SEHq4nB2WCMVideo of my Arduino setup

For the "Arduino" bordArduino board I use 12v DC in and usbUSB from my PC. Code

Code:

#include "Arduino.h"
#include "ESP8266.h"

#include "SoftwareSerial.h"
SoftwareSerial  ConsoleOut(8, 9);

#define SSID  "ASUS"
#define PWD   "tmpPassword"

void setup() {
  char  *ipAddress, ap[31];

  WiFi.reset(WIFI_RESET_HARD);
  WiFi.begin(9600);
  ConsoleOut.print("flag2");
  if (WiFi.join(SSID, PWD) == WIFI_ERR_OK) {
    ipAddress = WiFi.ip(WIFI_MODE_STA);
    ConsoleOut.print(F("\n\rIP address:"));
    ConsoleOut.print(ipAddress);
    ConsoleOut.print(':');
    ConsoleOut.print("flag1");
    if (WiFi.isConnect(ap))
      ConsoleOut.println(ap);
    else
      ConsoleOut.println(F("not found"));
  } else
    while (1);
}

void loop() {
  if (WiFi.connect((char *)"www.google.co.jp", 80) == WIFI_ERR_CONNECT) {
 
    if (WiFi.send((const uint8_t *)"GET / HTTP/1.1\r\n\r\n") == WIFI_ERR_OK) {
      int16_t c;
      uint16_t len = WiFi.listen(10000UL);
      while (len)
        if ((c = WiFi.read()) > 0) {
          ConsoleOut.write((char)c);
          len--;
        }
    } else
      ConsoleOut.println(F("Send fail"));
 
    WiFi.close();
 
  } else
    ConsoleOut.println(F("TCP connect fail"));
 
  WiFi.disconnect();
 
  while (1);
}

Code:   

enter image description here

Different from the Exampleexample sketch is that I use 2K instead of 3K resistors for R2,R4 R4 and 1K for R1, R3.    (2K on left side in the video 1K on the right side)

The ledLED of the WiFi lights red constant,constantly. I don't know what that means, and the blue ledLED on the wiFi module lights up whenever I upload a sketch to the arduinoArduino.

Thanks, in advance, any. Any help is really, really appreciated.

WiFi module ESP8266-01 for arduino not working

I am new to using arduino just bought my first one yesterday, and I also got an WiFi module. The "arduino" I got is another brand but should be the same as the Arduino uno rev 3 and I got the ESP8266-01 wifi module.

I've tried doing some simple examples projects following some youtube videos, and all ones have worked no problem.

What I am trying to create is a simple magnetic door switch when its opened I get a signal to my computer. Getting the magnetic door switch wired with the Arduino and getting a LED to light up when the magnetic switch opened worked no problem.

But to set up the wifi module, I cant get it to work.

This is the instructions I am trying currently: https://github.com/Hieromon/ESP8266

Video of my arduino setup: https://www.youtube.com/watch?v=SEHq4nB2WCM

For the "Arduino" bord I use 12v DC in and usb from my PC. Code:

#include "Arduino.h"
#include "ESP8266.h"

#include "SoftwareSerial.h"
SoftwareSerial  ConsoleOut(8, 9);

#define SSID  "ASUS"
#define PWD   "tmpPassword"

void setup() {
  char  *ipAddress, ap[31];

  WiFi.reset(WIFI_RESET_HARD);
  WiFi.begin(9600);
  ConsoleOut.print("flag2");
  if (WiFi.join(SSID, PWD) == WIFI_ERR_OK) {
    ipAddress = WiFi.ip(WIFI_MODE_STA);
    ConsoleOut.print(F("\n\rIP address:"));
    ConsoleOut.print(ipAddress);
    ConsoleOut.print(':');
    ConsoleOut.print("flag1");
    if (WiFi.isConnect(ap))
      ConsoleOut.println(ap);
    else
      ConsoleOut.println(F("not found"));
  } else
    while (1);
}

void loop() {
  if (WiFi.connect((char *)"www.google.co.jp", 80) == WIFI_ERR_CONNECT) {
 
    if (WiFi.send((const uint8_t *)"GET / HTTP/1.1\r\n\r\n") == WIFI_ERR_OK) {
      int16_t c;
      uint16_t len = WiFi.listen(10000UL);
      while (len)
        if ((c = WiFi.read()) > 0) {
          ConsoleOut.write((char)c);
          len--;
        }
    } else
      ConsoleOut.println(F("Send fail"));
 
    WiFi.close();
 
  } else
    ConsoleOut.println(F("TCP connect fail"));
 
  WiFi.disconnect();
 
  while (1);
}

Code:  enter image description here

Different from the Example sketch is that I use 2K instead of 3K resistors for R2,R4 and 1K for R1, R3.  (2K on left side in the video 1K on the right side)

The led of the WiFi lights red constant, I don't know what that means, and the blue led on the wiFi module lights up whenever I upload a sketch to the arduino.

Thanks, in advance, any help is really, really appreciated.

WiFi module ESP8266-01 for Arduino not working

I am new to using Arduino just bought my first one yesterday, and I also got an WiFi module. The Arduino I got is another brand but should be the same as the Arduino Uno rev 3 and I got the ESP8266-01 wifi module.

I've tried doing some simple examples projects following some YouYube videos, and all those have worked without problem.

What I am trying to create is a simple magnetic door switch. When it's opened I get a signal to my computer. Getting the magnetic door switch wired with the Arduino and getting an LED to light up when the magnetic switch opened worked without problem.

But to set up the wifi module, I can't get it to work.

These are the instructions I am trying currently.

Video of my Arduino setup

For the Arduino board I use 12v DC in and USB from my PC.

Code:

#include "Arduino.h"
#include "ESP8266.h"

#include "SoftwareSerial.h"
SoftwareSerial  ConsoleOut(8, 9);

#define SSID  "ASUS"
#define PWD   "tmpPassword"

void setup() {
  char  *ipAddress, ap[31];

  WiFi.reset(WIFI_RESET_HARD);
  WiFi.begin(9600);
  ConsoleOut.print("flag2");
  if (WiFi.join(SSID, PWD) == WIFI_ERR_OK) {
    ipAddress = WiFi.ip(WIFI_MODE_STA);
    ConsoleOut.print(F("\n\rIP address:"));
    ConsoleOut.print(ipAddress);
    ConsoleOut.print(':');
    ConsoleOut.print("flag1");
    if (WiFi.isConnect(ap))
      ConsoleOut.println(ap);
    else
      ConsoleOut.println(F("not found"));
  } else
    while (1);
}

void loop() {
  if (WiFi.connect((char *)"www.google.co.jp", 80) == WIFI_ERR_CONNECT) {
    if (WiFi.send((const uint8_t *)"GET / HTTP/1.1\r\n\r\n") == WIFI_ERR_OK) {
      int16_t c;
      uint16_t len = WiFi.listen(10000UL);
      while (len)
        if ((c = WiFi.read()) > 0) {
          ConsoleOut.write((char)c);
          len--;
        }
    } else
      ConsoleOut.println(F("Send fail"));
    WiFi.close();
  } else
    ConsoleOut.println(F("TCP connect fail"));
  WiFi.disconnect();
  while (1);
}

Code: 

enter image description here

Different from the example sketch is that I use 2K instead of 3K resistors for R2, R4 and 1K for R1, R3.  (2K on left side in the video 1K on the right side)

The LED of the WiFi lights red constantly. I don't know what that means, and the blue LED on the wiFi module lights up whenever I upload a sketch to the Arduino.

Thanks in advance. Any help is really, really appreciated.

added 1419 characters in body
Source Link

For the "Arduino" bord I use 12v DC in and usb from my PC. Code:

#include "Arduino.h"
#include "ESP8266.h"

#include "SoftwareSerial.h"
SoftwareSerial  ConsoleOut(8, 9);

#define SSID  "ASUS"
#define PWD   "tmpPassword"

void setup() {
  char  *ipAddress, ap[31];

  WiFi.reset(WIFI_RESET_HARD);
  WiFi.begin(9600);
  ConsoleOut.print("flag2");
  if (WiFi.join(SSID, PWD) == WIFI_ERR_OK) {
    ipAddress = WiFi.ip(WIFI_MODE_STA);
    ConsoleOut.print(F("\n\rIP address:"));
    ConsoleOut.print(ipAddress);
    ConsoleOut.print(':');
    ConsoleOut.print("flag1");
    if (WiFi.isConnect(ap))
      ConsoleOut.println(ap);
    else
      ConsoleOut.println(F("not found"));
  } else
    while (1);
}

void loop() {
  if (WiFi.connect((char *)"www.google.co.jp", 80) == WIFI_ERR_CONNECT) {

    if (WiFi.send((const uint8_t *)"GET / HTTP/1.1\r\n\r\n") == WIFI_ERR_OK) {
      int16_t c;
      uint16_t len = WiFi.listen(10000UL);
      while (len)
        if ((c = WiFi.read()) > 0) {
          ConsoleOut.write((char)c);
          len--;
        }
    } else
      ConsoleOut.println(F("Send fail"));

    WiFi.close();

  } else
    ConsoleOut.println(F("TCP connect fail"));

  WiFi.disconnect();

  while (1);
}

For the "Arduino" bord I use 12v DC in and usb from my PC.

For the "Arduino" bord I use 12v DC in and usb from my PC. Code:

#include "Arduino.h"
#include "ESP8266.h"

#include "SoftwareSerial.h"
SoftwareSerial  ConsoleOut(8, 9);

#define SSID  "ASUS"
#define PWD   "tmpPassword"

void setup() {
  char  *ipAddress, ap[31];

  WiFi.reset(WIFI_RESET_HARD);
  WiFi.begin(9600);
  ConsoleOut.print("flag2");
  if (WiFi.join(SSID, PWD) == WIFI_ERR_OK) {
    ipAddress = WiFi.ip(WIFI_MODE_STA);
    ConsoleOut.print(F("\n\rIP address:"));
    ConsoleOut.print(ipAddress);
    ConsoleOut.print(':');
    ConsoleOut.print("flag1");
    if (WiFi.isConnect(ap))
      ConsoleOut.println(ap);
    else
      ConsoleOut.println(F("not found"));
  } else
    while (1);
}

void loop() {
  if (WiFi.connect((char *)"www.google.co.jp", 80) == WIFI_ERR_CONNECT) {

    if (WiFi.send((const uint8_t *)"GET / HTTP/1.1\r\n\r\n") == WIFI_ERR_OK) {
      int16_t c;
      uint16_t len = WiFi.listen(10000UL);
      while (len)
        if ((c = WiFi.read()) > 0) {
          ConsoleOut.write((char)c);
          len--;
        }
    } else
      ConsoleOut.println(F("Send fail"));

    WiFi.close();

  } else
    ConsoleOut.println(F("TCP connect fail"));

  WiFi.disconnect();

  while (1);
}
Source Link

WiFi module ESP8266-01 for arduino not working

I am new to using arduino just bought my first one yesterday, and I also got an WiFi module. The "arduino" I got is another brand but should be the same as the Arduino uno rev 3 and I got the ESP8266-01 wifi module.

I've tried doing some simple examples projects following some youtube videos, and all ones have worked no problem.

What I am trying to create is a simple magnetic door switch when its opened I get a signal to my computer. Getting the magnetic door switch wired with the Arduino and getting a LED to light up when the magnetic switch opened worked no problem.

But to set up the wifi module, I cant get it to work.

I have spent hours and hours watching tutorials reading all I can find to trying everything to get this to work, but no luck.

I don't know If I am doing something wrong (probably) or if something is broken.

This is the instructions I am trying currently: https://github.com/Hieromon/ESP8266

Video of my arduino setup: https://www.youtube.com/watch?v=SEHq4nB2WCM

For the "Arduino" bord I use 12v DC in and usb from my PC.

Code: enter image description here

Different from the Example sketch is that I use 2K instead of 3K resistors for R2,R4 and 1K for R1, R3. (2K on left side in the video 1K on the right side)

The led of the WiFi lights red constant, I don't know what that means, and the blue led on the wiFi module lights up whenever I upload a sketch to the arduino.

Thanks, in advance, any help is really, really appreciated.