C   20

Project

Guest on 13th June 2022 04:44:45 PM

  1. #define BLYNK_PRINT Serial  
  2. #include <SPI.h>
  3. #include <ESP8266WiFi.h>
  4. #include <BlynkSimpleEsp8266.h>
  5. #include <SimpleTimer.h>
  6. #include <DHT.h>
  7. #define BLYNK_PRINT Serial
  8. #include <OneWire.h>
  9. #include <DallasTemperature.h>
  10. #define ONE_WIRE_BUS D2
  11. OneWire oneWire(ONE_WIRE_BUS);
  12. DallasTemperature sensors(&oneWire);
  13.  
  14. char auth[] ="----------------";               //Authentication code sent by Blynk
  15. char ssid[] = "-------";                       //WiFi SSID
  16. char pass[] = "-------";                       //WiFi Password
  17.  
  18. #define sensorPin D3
  19. int sensorState = 0;
  20. int lastState = 0;
  21. #define DHTPIN 2    
  22. #define DHTTYPE DHT11    
  23. DHT dht(DHTPIN, DHTTYPE);
  24. SimpleTimer timer;
  25. void sendSensor()
  26. {

Raw Paste


Login or Register to edit or fork this paste. It's free.