Reduce LED Brightness

This commit is contained in:
seiichiro 2021-03-02 18:32:56 +01:00
parent 1ffadfcb74
commit 15496a5c4a

View file

@ -192,10 +192,14 @@ void do_send(osjob_t* j) {
#ifndef HAS_NO_SENSOR #ifndef HAS_NO_SENSOR
sensor.getSensorData(data); sensor.getSensorData(data);
// ppm_level // Queue Packet for Sending
// 0 -> < 1000 ppm green DEBUG_PRINTLN("LoRa-Packet Queued");
// 1 -> < 1800 ppm yellow LMIC_setTxData2(1, (unsigned char *)&data, sizeof(data), 0);
// 2 -> > 1000 ppm red
// ppm level
// < 1000 ppm green
// < 1800 ppm yellow
// > 1000 ppm red
if (data.ppm > 0 && data.ppm <= 1000) { if (data.ppm > 0 && data.ppm <= 1000) {
leds.setPixelColor(0, leds.Color(0,127,0)); leds.setPixelColor(0, leds.Color(0,127,0));
@ -212,9 +216,7 @@ void do_send(osjob_t* j) {
} }
#endif #endif
// Queue Packet for Sending
DEBUG_PRINTLN("LoRa-Packet Queued");
LMIC_setTxData2(1, (unsigned char *)&data, sizeof(data), 0);
} }
} }
@ -228,7 +230,7 @@ void setup()
SPI.begin(); SPI.begin();
pinMode(PIN_PC1, OUTPUT); pinMode(PIN_PC1, OUTPUT);
leds.setBrightness(127); leds.setBrightness(64);
// Disable unused Pins (for power saving) // Disable unused Pins (for power saving)
for (int i = 0; i < (sizeof(disabledPins) / sizeof(disabledPins[0])) - 1; i++) for (int i = 0; i < (sizeof(disabledPins) / sizeof(disabledPins[0])) - 1; i++)