#include #include #include #include int index_html_gz_len = 3863; const uint8_t index_html_gz[] = { 0x1f, 0x8b, 0x08, 0x08, 0x66, 0x84, 0x3d, 0x5d, 0x00, 0xff, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x2e, 0x67, 0x7a, 0x00, 0x95, 0x58, 0x7b, 0x6f, 0x1a, 0x3b, 0x16, 0xff, 0x3b, 0x7c, 0x0a, 0x97, 0x68, 0x0b, 0x6c, 0x61, 0x86, 0x40, 0xdb, 0x6d, 0x28, 0xe4, 0x6a, 0xdb, 0x44, 0x6a, 0xa5, 0x56, 0xad, 0x36, 0xd9, 0x6d, 0xa2, 0xd5, 0x2a, 0x32, 0x33, 0x06, 0xdc, 0x7a, 0xec, 0xb9, 0xb6, 0x87, 0xc7, 0xdd, 0xe6, 0xbb, 0xf7, 0x1c, 0x8f, 0xe7, 0x45, 0x48, 0x94, 0xf2, 0x07, 0xcc, 0xd8, 0xe7, 0x77, 0x9e, 0x0f, 0x1f, 0x33, 0x5d, 0xd9, 0x44, 0x9c, 0xb5, 0xa6, 0x2b, 0x46, 0x63, 0xf8, 0x49, 0x98, 0xa5, 0x44, 0xd2, 0x84, 0xcd, 0x3a, 0x6b, 0xce, 0x36, 0xa9, 0xd2, 0xb6, 0x43, 0x8a, 0x4f, 0xa4, 0xa4, 0x65, 0xd2, 0xce, 0x3a, 0x1b, 0x1e, 0xdb, 0xd5, 0x2c, 0x66, 0x6b, 0x1e, 0xb1, 0x81, 0x7b, 0xe9, 0x97, 0x44, 0x5c, 0x72, 0xcb, 0xa9, 0x18, 0x98, 0x88, 0x0a, 0x36, 0x3b, 0x09, 0x86, 0xd5, 0x56, 0x66, 0x98, 0x76, 0xeb, 0x74, 0x0e, 0x5b, 0x52, 0x75, 0x48, 0x08, 0x22, 0x2d, 0xb7, 0x82, 0x9d, 0x7d, 0xa5, 0x92, 0x50, 0x19, 0x93, 0x2b, 0x2e, 0x2c, 0xb9, 0xb8, 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a5, 0x74, 0xdb, 0x77, 0xa5, 0x84, 0x5c, 0x8a, 0xf7, 0x61, 0xaf, 0x93, 0xcb, 0x46, 0xcf, 0xa6, 0x54, 0x9e, 0xb3, 0xa5, 0x66, 0x0c, 0x1d, 0xe1, 0x50, 0x7f, 0x27, 0xa7, 0x43, 0x18, 0xf0, 0xee, 0xf5, 0x87, 0x0a, 0x63, 0xe1, 0x9f, 0x90, 0x0a, 0xe4, 0x58, 0x37, 0x41, 0xd5, 0xf0, 0x76, 0xe4, 0x7c, 0x50, 0x13, 0x02, 0x3a, 0xf4, 0x51, 0xa1, 0x1a, 0x0f, 0x77, 0x7d, 0x86, 0xbb, 0x98, 0xbf, 0x90, 0x4c, 0x43, 0x7f, 0x0b, 0x0b, 0xdd, 0x1f, 0x40, 0xbf, 0x00, 0x13, 0x65, 0x13, 0xd4, 0x07, 0x12, 0x00, 0x00 }; const char* ssid = "NSA"; const char* password = "Orange"; using namespace websockets; WebsocketsServer WSserver; AsyncWebServer webserver(80); Servo panServo; // create servo object to control a servo int panPos = 90; // variable to store the servo position Servo tiltServo; int tiltPos = 90; void setup() { Serial.begin(115200); // Lolin: 16 and 17 panServo.attach(16); // attaches the servo on pin 16 to the servo object panServo.write(panPos); tiltServo.attach(17); tiltServo.write(tiltPos); WiFi.mode(WIFI_STA); WiFi.begin(ssid, password); // Wait for connection while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.print("IP address: "); Serial.println(WiFi.localIP()); webserver.on("/", HTTP_GET, [](AsyncWebServerRequest * request) { AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", index_html_gz, sizeof(index_html_gz)); response->addHeader("Content-Encoding", "gzip"); request->send(response); }); webserver.begin(); WSserver.listen(82); } void handle_message(WebsocketsMessage msg) { Serial.print("Got Message: "); Serial.println(msg.data()); int commaIndex = msg.data().indexOf(','); int panValue = msg.data().substring(0, commaIndex).toInt(); int tiltValue = msg.data().substring(commaIndex + 1).toInt(); panServo.write(panValue + 90); tiltServo.write(tiltValue + 90); Serial.print("Pan: "); Serial.println(panValue); Serial.print("Tilt: "); Serial.println(tiltValue); } void loop() { auto client = WSserver.accept(); client.onMessage(handle_message); while (client.available()) { client.poll(); } }