Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ESP8266WiFi.h>
- int status = WL_IDLE_STATUS;
- const char* ssid = "alohaWIFI";
- const char* pass = "qwerty123456";
- const char* host = "192.168.4.1";
- WiFiClient client;
- void setup() {
- Serial.begin(9600);
- WiFi.begin(ssid,pass);
- Serial.print("connection to ");
- Serial.print(ssid);
- delay(500);
- while(WiFi.status() != WL_CONNECTED)
- {
- delay(500);
- Serial.print(".");
- }
- if(client.connect(host, 1660))
- {
- Serial.print("assss");
- client.print("Hello! Tu Olek i Szymon\r");
- }
- else
- {
- client.print("`errrrrrrooooor!\r");
- }
- Serial.println();
- Serial.print("Connected!");
- Serial.print("SSID: ");
- Serial.println(WiFi.SSID());
- IPAddress ip = WiFi.localIP();
- Serial.print("IP Address: ");
- Serial.println(ip);
- }
- //
- void loop() {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement