Update light sensor

This commit is contained in:
2025-12-30 23:09:23 +01:00
parent e0dea1fbce
commit 29656166a2

View File

@@ -1,3 +1,4 @@
#include <heltec.h>
#include "Arduino.h"
#include <Wire.h>
#include <SPI.h>
@@ -60,13 +61,13 @@ void setup() {
oled.setTextSize(1);
oled.setTextColor(SSD1306_WHITE);
oled.setCursor(0, 10);
oled.println("Hello OLED!");
oled.println("Hey you ! <3" );
oled.display();
}
void loop() {
if (lora_idle) {
delay(1000);
delay(5000);
int sensorValue = analogRead(LIGHT_SENSOR_PIN);
float percentile = (sensorValue * 100.0) / 2430.0;