// Template ID, Device Name and Auth Token are provided by the Blynk.Cloud // See the Device Info tab, or Template settings #define BLYNK_TEMPLATE_ID "TMPL4swPX0pKP" #define BLYNK_TEMPLATE_NAME "termometr" #define BLYNK_AUTH_TOKEN "tu_wklejam_moj_token" // Comment this out to disable prints and save space #define BLYNK_PRINT Serial #include #include #include #include #include // Blynk Authentication Token and WiFi credentials #define BLYNK_TEMPLATE_ID "TMPL4swPX0pKP" #define BLYNK_TEMPLATE_NAME "termometr" #define BLYNK_AUTH_TOKEN "gKgq_NCNNWSY1FzEPCYkVoO0DBuHwL0B" char ssid[] = "moja_siec_wifi"; char pass[] = "moje_haslo"; // Data pin definitions for DS18B20 sensors #define ONE_WIRE_BUS D2 OneWire oneWire(ONE_WIRE_BUS); DallasTemperature DS18B20(&oneWire); float temp1, temp2; void setup() { Serial.begin(115200); Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass); DS18B20.begin(); } void loop() { Blynk.run(); DS18B20.requestTemperatures(); temp1 = DS18B20.getTempCByIndex(0); temp2 = DS18B20.getTempCByIndex(1); Serial.print("Temperature 1: "); Serial.println(temp1); Serial.print("Temperature 2: "); Serial.println(temp2); Blynk.virtualWrite(V0, temp1); Blynk.virtualWrite(V1, temp2); }