Hello!
I am currently working with my ESP8266 (ESP-01S) wifi module for my Arduino Uno.
I programmed it with this:
#include <ESP8266WiFi.h> // Include the Wi-Fi library
const char* ssid = "SSID"; // The SSID (name) of the Wi-Fi network you want to connect to
const char* password = "PASSWORD"; // The password of the Wi-Fi network
void setup() {
Serial.begin(115200); // Start the Serial communication to send messages to the computer
delay(10);
Serial.println('\n');
WiFi.begin(ssid, password); // Connect to the network
Serial.print("Connecting to ");
Serial.print(ssid); Serial.println(" ...");
int i = 0;
while (WiFi.status() != WL_CONNECTED) { // Wait for the Wi-Fi to connect
delay(1000);
Serial.print(++i); Serial.print(' ');
}
Serial.println('\n');
Serial.println("Connection established!");
Serial.print("IP address:\t");
Serial.println(WiFi.localIP()); // Send the IP address of the ESP8266 to the computer
}
void loop() { }
I changed the SSID & Password to my own.
But I Keep getting this error.
Arduino:1.8.13 (Mac OS X), Board:"Generic ESP8266 Module, 160 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 16MB (FS:14MB OTA:~1019KB), 1, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
Executable segment sizes:
IROM : 236960 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 26888 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...)
DATA : 1260 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 808 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 24968 ) - zeroed variables (global, static) in RAM/HEAP
De schets gebruikt 265916 bytes (25%) programma-opslagruimte. Maximum is 1044464 bytes.
Globale variabelen gebruiken 27036 bytes (33%) van het dynamisch geheugen. Resteren 54884 bytes voor lokale variabelen. Maximum is 81920 bytes.
esptool.py v2.8
Serial port /dev/cu.usbmodemFD121
Connecting........_____....._____....._____....._____....._____....._____.....____Traceback (most recent call last):
File "/Users/joepL10/Library/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/upload.py", line 65, in <module>
esptool.main(cmdline)
File "/Users/joepL10/Library/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool/esptool.py", line 2890, in main
esp.connect(args.before)
File "/Users/joepL10/Library/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool/esptool.py", line 483, in connect
raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
esptool.FatalError: Failed to connect to ESP8266: Invalid head of packet (0xF0)
_
esptool.FatalError: Failed to connect to ESP8266: Invalid head of packet (0xF0)
Is there anyone who can help me with this, or give me a GOOD tutorial, not one where they use different software or hardware.
I currently wired the ESP8266 like this:
ESP8266 - Arduino
GND - GND
3v3 - 3,3V
TX - TX (1)
RX - RX (0)
EN (chip) - 3,3V
Thanks in advance!
Joep