mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 03:22:21 +00:00
.
This commit is contained in:
@@ -12,7 +12,7 @@ Adafruit_BME280 bme;
|
||||
TaskHandle_t TaskStatusLED, TaskSensorValues;
|
||||
|
||||
// Dummy task blinking built-in LED
|
||||
void TaskStatusLEDCode (void * parameters) {
|
||||
void TaskStatusLEDCode (void* parameters) {
|
||||
Serial.print("Task 0 running on core # ");
|
||||
Serial.println(xPortGetCoreID());
|
||||
|
||||
@@ -27,6 +27,19 @@ void TaskStatusLEDCode (void * parameters) {
|
||||
vTaskDelay(1500);
|
||||
}
|
||||
}
|
||||
void TaskSensorValuesCode (void* parameters) {
|
||||
Serial.println("BME-280 Sensors Readings ...");
|
||||
Serial.print("Temperature: ");
|
||||
Serial.print(bme.readTemperature());
|
||||
Serial.println("°C");
|
||||
Serial.print("Humidity: ");
|
||||
Serial.print(bme.readHumidity());
|
||||
Serial.println("%");
|
||||
Serial.print("Barometric Pressure: ");
|
||||
Serial.print(bme.readPressure() / 100.0F);
|
||||
Serial.println(" kPa");
|
||||
Serial.println("");
|
||||
}
|
||||
|
||||
void setup() {
|
||||
Serial.begin(9600);
|
||||
|
Reference in New Issue
Block a user