This commit is contained in:
2024-07-15 17:02:27 -04:00
parent 990f44e121
commit 28f2026512
2 changed files with 13 additions and 6 deletions

View File

@@ -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;

View File

@@ -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();