- Posts: 1
- Thank you received: 0
#include <ESP8266WiFi.h>
String ssid = "ssid";
String password = "password";
void setup() {
IPAddress ip(192, 168, 1, 17);
IPAddress subnet(255, 255, 255, 0);
IPAddress gt(192, 168, 1, 1);
Serial.begin(115200);
char charBuf[50];
char charBuf2[50];
ssid.toCharArray(charBuf, 50);
password.toCharArray(charBuf2, 50);
WiFi.config(ip, gt, subnet);
WiFi.begin(charBuf , charBuf2);
// Wait for connection
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
// put your main code here, to run repeatedly:
}
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.