Update light sensor
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
#include <heltec.h>
|
||||||
#include "Arduino.h"
|
#include "Arduino.h"
|
||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
@@ -60,13 +61,13 @@ void setup() {
|
|||||||
oled.setTextSize(1);
|
oled.setTextSize(1);
|
||||||
oled.setTextColor(SSD1306_WHITE);
|
oled.setTextColor(SSD1306_WHITE);
|
||||||
oled.setCursor(0, 10);
|
oled.setCursor(0, 10);
|
||||||
oled.println("Hello OLED!");
|
oled.println("Hey you ! <3" );
|
||||||
oled.display();
|
oled.display();
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
if (lora_idle) {
|
if (lora_idle) {
|
||||||
delay(1000);
|
delay(5000);
|
||||||
|
|
||||||
int sensorValue = analogRead(LIGHT_SENSOR_PIN);
|
int sensorValue = analogRead(LIGHT_SENSOR_PIN);
|
||||||
float percentile = (sensorValue * 100.0) / 2430.0;
|
float percentile = (sensorValue * 100.0) / 2430.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user