#include #include #define PIN 15 // DIN PIN (GPIO15, D8) #define NUMPIXELS 50 // Number of you led Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); const char* ssid = "YOURSSID"; // Your Wi-Fi Name const char* password = "YOURPASSWORD"; // Wi-Fi Password int value = 2; int wait = 10; long firstPixelHue = 0; unsigned long previousMillis = 0; int r, g, b = 0; WiFiClient client; WiFiServer server(80); String requestClient; void setup() { Serial.begin(115200); //Default Baudrate Serial.print("Connecting to the Newtork"); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); //unsigned long currentMillis = millis(); //if(currentMillis - previousMillis >= 500) //{ // previousMillis = currentMillis; Serial.print("."); //} } Serial.println("WiFi connected"); server.begin(); // Starts the Server Serial.println("Server started"); Serial.print("IP Address of network: "); // will IP address on Serial Monitor Serial.println(WiFi.localIP()); Serial.print("Copy and paste the following URL: http://"); // Will print IP address in URL format Serial.print(WiFi.localIP()); Serial.println("/"); pixels.begin(); } void loop() { request(); if(value == 1) { for(int i=0; i= 10) { previousMillis = currentMillis; firstPixelHue += 256; for(int i=0; i=0) { Serial.print("Hex als String gefiltert: "); Serial.println(request); request.remove(0,1); Serial.print("Hex als long: "); long color = strtol(request.c_str(), NULL, 16); Serial.println(color); r = color / 65536; g = (color - r * 65536) / 256; b = color - r * 65536 - g * 256; } if(request.equals("ON")) { value = HIGH; } if(request.equals("OFF")) { value = LOW; } } } }