diff --git a/src/graphics/RAKled.h b/src/graphics/RAKled.h new file mode 100644 index 000000000..06e2a717f --- /dev/null +++ b/src/graphics/RAKled.h @@ -0,0 +1,7 @@ +#include "main.h" + +#ifdef RAK4630 +#include +extern NCP5623 rgb; + +#endif \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 937f9091a..c867930d0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,6 +19,7 @@ #include "detect/ScanI2CTwoWire.h" #include "detect/axpDebug.h" #include "detect/einkScan.h" +#include "graphics/RAKled.h" #include "graphics/Screen.h" #include "main.h" #include "mesh/generated/meshtastic/config.pb.h" @@ -360,6 +361,15 @@ void setup() // Only one supported RGB LED currently rgb_found = i2cScanner->find(ScanI2C::DeviceType::NCP5623); +// Start the RGB LED at 50% +#ifdef RAK4630 + if (rgb_found.type == ScanI2C::NCP5623) { + rgb.begin(); + rgb.setCurrent(10); + rgb.setColor(128, 128, 128); + } +#endif + #if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) auto acc_info = i2cScanner->firstAccelerometer(); accelerometer_found = acc_info.type != ScanI2C::DeviceType::NONE ? acc_info.address : accelerometer_found; diff --git a/src/modules/ExternalNotificationModule.cpp b/src/modules/ExternalNotificationModule.cpp index 7dbf78a08..82701cdc0 100644 --- a/src/modules/ExternalNotificationModule.cpp +++ b/src/modules/ExternalNotificationModule.cpp @@ -11,7 +11,7 @@ #include "main.h" #ifdef RAK4630 -#include +#include NCP5623 rgb; uint8_t red = 0;