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