This commit is contained in:
Alexander 2024-07-15 18:10:12 -04:00
parent b9f7086212
commit 6153ff788d
2 changed files with 2 additions and 0 deletions

View File

@ -29,4 +29,5 @@ const char* WIFI_PASSWORD = "208208208";
#define ADC1 (1) #define ADC1 (1)
int light_sensor_reading = 0; int light_sensor_reading = 0;
float lighting_percentage = 0.00;

View File

@ -34,6 +34,7 @@ void TaskStatusLEDCode (void* parameters) {
void TaskSensorValuesCode (void* parameters) { void TaskSensorValuesCode (void* parameters) {
for (;;) { for (;;) {
lighting_percentage = map(analogRead(ADC1), 0.0f, 4095.0f, 0, 100);
Serial.println("BME-280 Sensors Readings ..."); Serial.println("BME-280 Sensors Readings ...");
Serial.print("Temperature:\t\t"); Serial.print("Temperature:\t\t");
Serial.print(bme.readTemperature()); Serial.print(bme.readTemperature());