mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-09-26 16:57:46 +00:00
.
This commit is contained in:
@@ -26,4 +26,7 @@ const char* WIFI_PASSWORD = "208208208";
|
||||
#define SCL_PIN (7)
|
||||
#define 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(bme.readPressure() / 100.0F);
|
||||
Serial.println("\tkPa");
|
||||
// ADC GPIO1
|
||||
light_sensor_reading = analogRead(ADC1);
|
||||
Serial.print("Light:\t\t");
|
||||
Serial.println(light_sensor_reading);
|
||||
Serial.println("");
|
||||
vTaskDelay(pdMS_TO_TICKS(5000));
|
||||
}
|
||||
|
Reference in New Issue
Block a user