Hi all,
The old code seem not working, i had tried to follow the DHT11 example code, but none of data was upload to the cloud
I got reading (temperature )in serial, and used BlynkEdgent, but no reading in cloud…
Please help, many thanks!
#define BLYNK_TEMPLATE_ID "TMPxxxxc"
#define BLYNK_DEVICE_NAME "RT02"
#define BLYNK_FIRMWARE_VERSION "0.1.0"
#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG
#define APP_DEBUG
// Uncomment your board, or configure a custom board in Settings.h
//#define USE_WROVER_BOARD
//#define USE_TTGO_T7
//#define USE_ESP32C3_DEV_MODULE
#define USE_ESP32S2_DEV_KIT
#include "BlynkEdgent.h"
//Basic libary
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h> // Hardware-specific library for ST7735
#include <max6675.h>
#include <SPI.h>
// MAX6625 setting for node32s
int thermoDO = 19; //MISO
int thermoCLK = 18;
int thermoCS1 = 5;
MAX6675 thermocouple(thermoCLK, thermoCS1, thermoDO);
BlynkTimer timer;
void setup()
{
Serial.begin(115200);
delay(500);
BlynkEdgent.begin();
timer.setInterval(2000L, sendsensor);
}
void loop() {
BlynkEdgent.run();
timer.run();
Serial.print("C = ");
Serial.println(thermocouple.readCelsius());
Serial.print("F = ");
Serial.println(thermocouple.readFahrenheit());
// For the MAX6675 to update, you must delay AT LEAST 250ms between reads!
delay(1000);
}
void sendsensor()
{
// You can send any value at any time.
// Please don't send more that 10 values per second.
float temp = thermocouple.readCelsius();
Blynk.virtualWrite(V6, temp);
}