mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-07 22:24:26 +00:00
.
This commit is contained in:
@@ -22,8 +22,11 @@ const char* WIFI_PASSWORD = "208208208";
|
||||
A0 -> GPIO2
|
||||
|
||||
*/
|
||||
#define SDA_PIN (6)
|
||||
#define SCL_PIN (7)
|
||||
#define LED_PIN (8)
|
||||
#define SYS_LED_PIN (8)
|
||||
#define SDA_PIN (6)
|
||||
#define SCL_PIN (7)
|
||||
#define LED_PIN (8)
|
||||
#define SYS_LED_PIN (8)
|
||||
#define ADC1 (1)
|
||||
|
||||
int light_sensor_reading = 0;
|
||||
|
||||
|
@@ -44,13 +44,17 @@ 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void setup() {
|
||||
Serial.println("Please wait 2 seconds ...");
|
||||
Serial.println("Please wait 2 seconds ...");
|
||||
delay(2000);
|
||||
Serial.begin(9600);
|
||||
Serial.println();
|
||||
|
Reference in New Issue
Block a user