mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-09-27 01:37:48 +00:00
.
This commit is contained in:
@@ -26,4 +26,7 @@ const char* WIFI_PASSWORD = "208208208";
|
|||||||
#define SCL_PIN (7)
|
#define SCL_PIN (7)
|
||||||
#define LED_PIN (8)
|
#define LED_PIN (8)
|
||||||
#define SYS_LED_PIN (8)
|
#define SYS_LED_PIN (8)
|
||||||
|
#define ADC1 (1)
|
||||||
|
|
||||||
|
int light_sensor_reading = 0;
|
||||||
|
|
||||||
|
@@ -44,6 +44,10 @@ void TaskSensorValuesCode (void* parameters) {
|
|||||||
Serial.print("Barometric Pressure:\t");
|
Serial.print("Barometric Pressure:\t");
|
||||||
Serial.print(bme.readPressure() / 100.0F);
|
Serial.print(bme.readPressure() / 100.0F);
|
||||||
Serial.println("\tkPa");
|
Serial.println("\tkPa");
|
||||||
|
// ADC GPIO1
|
||||||
|
light_sensor_reading = analogRead(ADC1);
|
||||||
|
Serial.print("Light:\t\t");
|
||||||
|
Serial.println(light_sensor_reading);
|
||||||
Serial.println("");
|
Serial.println("");
|
||||||
vTaskDelay(pdMS_TO_TICKS(5000));
|
vTaskDelay(pdMS_TO_TICKS(5000));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user