How do I connect to the WiFi using this board: UNO R3+WiFi ATmega328P+ESP8266 32Mb Memory USB-TTL CH340G Compatible For Arduino Uno NodeMCU ESP8266 - ArduinoTech. I have tried several different type of code and none of it works.
The code below is the closest I have gotten to it working. It compiles, but i get "[WiFEsp] >>> TIMEOUT >>"
#include "WiFiEsp.h"
// Emulate Serial1 on pins 6/7 if not present
#ifndef HAVE_HWSERIAL1
#include "SoftwareSerial.h"
SoftwareSerial Serial1(6, 7); // RX, TX
#endif
char ssid[] = "Andreas"; // your network SSID (name)
char pass[] = "12345678"; // your network password
int status = WL_IDLE_STATUS; // the Wifi radio's status
void setup() {
Serial.begin(115200);
Serial1.begin(9600);
WiFi.init(&Serial1);
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to WPA SSID: ");
Serial.println(ssid);
// Connect to WPA/WPA2 network:
status = WiFi.begin(ssid, pass);
// wait 10 seconds for connection:
delay(5000);
}
IPAddress ip = WiFi.localIP();
Serial.print(ip);
}
void loop() {
// put your main code here, to run repeatedly:
}