 unsigned long previousMillisr = 0;
 unsigned long previousMillisg = 0;
 unsigned long previousMillisb = 0;
+unsigned long previousMillisf = 0;
 int attendR = 70;
 int attendG = 70;
 int attendB = 70;
-OneWire oneWire(ONE_WIRE_BUS);
-DallasTemperature sensors(&oneWire);
+int attendF = 700;
+unsigned long flashfois = 0;
+unsigned long flashrendu = 0;
 int roulepastusuite = 0;
-
+int flashoufade = 0;
+// end of internally used vars
+
+// stylesheet for web pages
 const String css = "<style>\n"
                    ".color {\n"
                    "width:50%;\n"

#include <Arduino.h>
#include <WiFi.h>
#include <DNSServer.h>
#include <WebServer.h>
#include <WiFiManager.h>
#include <WiFiMulti.h>
#include <HTTPClient.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <DHT.h>
#include <ESPmDNS.h>

#define ONE_WIRE_BUS 15
#define DHTPIN 2
#define DHTTYPE DHT11

String resetpass = "MyResetPassword"; // password to reset wifimanager when allready connected
const String thingkey = "YOURTHINGSPEAKKEY"; //your thingspeak API key
String dernadd = "Fraichement boot&eacute;"; //variable for ip logging (you can put your fresh boot mesage here in text/html)

uint8_t pinRouge = 12;
uint8_t pinVerte = 14; // internally pulled up
uint8_t pinBleu = 13;

const long interval = 60000; // interval in ms for sending temperature data to thingspeak
const String liens = "<a href=\"/\">Acceuil</a> - <a href=\"/temp\">Temp&eacute;rature</a> - <a href=\"/version\">Version</a> - <a href=\"/reset\">Reset</a> - <a href=\"https://thingspeak.com/channels/289148\">Temp stats</a>\n"; // html/links shown at bottom of pages
DHT dht(DHTPIN, DHTTYPE);
WebServer server(80);

String derncoul;
long r;
long g;
long b;
int rouge = 0;
int vert = 0;
int bleu = 0;

                "Added random color selection button\n\n<br><br>"
                "Added disco mode script and buttons\n\n<br><br>"
                "Removed mDNS (does not work with esp32)\n<br>"
                "        (Re-aded mDNS in 2.0 for esp32 but does not seem to work yet)\n<br>"
                "Rewrite of code (removed Ticker and changed a few libraries) for esp32 !!!\n\n<br><br>"
                "Changed fader functions for smoother fade\n<br>"
                "Cleaned code\n\n<br><br>"
                "Added Flashing function and page for smart widget usage\n<br>"
                "Added var to show your thingspeak channel in /temp iframes\n\n<br><br>" + liens);
  });
  server.onNotFound(handleNotFound);
  server.begin();
  Serial.println("HTTP server started");
  delay(100);
  MDNS.addService("http", "tcp", 80);
  sensors.begin();
}
