// TD-ARDUINO // test des sliders #include #include const char* ssid = SECRET_SSID; // your network SSID (name) const char* password = SECRET_PSWD; // your network password char auth[] = SECRET_TOKEN; // your Blynk API token // Variables to store the combination value // Set the intitial combination to ( 1 1 1 ) int SliderValueOne = 1; int SliderValueTwo = 1; int SliderValueThree = 1; // Blynk functions to retrive values BLYNK_WRITE(V1) { SliderValueOne = param.asInt(); // assigning incoming value from pin V1 to a variable } BLYNK_WRITE(V2) { SliderValueTwo = param.asInt(); // assigning incoming value from pin V1 to a variable } BLYNK_WRITE(V3) { SliderValueThree = param.asInt(); // assigning incoming value from pin V1 to a variable } void setup() { Serial.begin(9600); Blynk.begin(auth, ssid, password); // start Blynk functionalities and connect to WiFi } void loop() { // Variambles to temporarily store the combination int Temp_Slider_One_value = SliderValueOne; int Temp_Slider_Two_value = SliderValueTwo; int Temp_Slider_Three_value = SliderValueThree; Blynk.run(); // poll new combination values from the online app // check if combination values are changed and print them on the console if(Temp_Slider_One_value != SliderValueOne || Temp_Slider_Two_value != SliderValueTwo || Temp_Slider_Three_value != SliderValueThree){ Serial.print("New combination: "); Serial.print(SliderValueOne); Serial.print(" "); Serial.print(SliderValueTwo); Serial.print(" "); Serial.println(SliderValueThree); } }