mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2024-10-05 20:47:50 -04:00
.
This commit is contained in:
parent
8ec29e7505
commit
5f7ea612f4
@ -8,6 +8,26 @@
|
||||
|
||||
Adafruit_BME280 bme;
|
||||
|
||||
// Define tasks.
|
||||
TaskHandle_t TaskStatusLED, TaskSensorValues;
|
||||
|
||||
// Dummy task blinking built-in LED
|
||||
void TaskStatusLEDCode (void * parameters) {
|
||||
Serial.print("Task 0 running on core # ");
|
||||
Serial.println(xPortGetCoreID());
|
||||
|
||||
for (;;) {
|
||||
digitalWrite(SYS_LED_PIN, LOW);
|
||||
vTaskDelay(250);
|
||||
digitalWrite(SYS_LED_PIN, HIGH);
|
||||
vTaskDelay(250);
|
||||
digitalWrite(SYS_LED_PIN, LOW);
|
||||
vTaskDelay(250);
|
||||
digitalWrite(SYS_LED_PIN, HIGH);
|
||||
vTaskDelay(1500);
|
||||
}
|
||||
}
|
||||
|
||||
void setup() {
|
||||
Serial.begin(9600);
|
||||
Serial.println();
|
||||
@ -52,7 +72,11 @@ void loop() {
|
||||
Serial.print("Temperature: ");
|
||||
Serial.print(bme.readTemperature());
|
||||
Serial.println("°C");
|
||||
|
||||
Serial.println("Main loop");
|
||||
|
||||
Serial.print("Humidity: ");
|
||||
Serial.print(bme.readHumidity());
|
||||
Serial.println("%");
|
||||
Serial.print("Barometric Pressure: ");
|
||||
Serial.print(bme.readPressure() / 100.0F);
|
||||
Serial.println(" kPa");
|
||||
Serial.println("");
|
||||
}
|
Loading…
Reference in New Issue
Block a user