This project demonstrates the usage of the RGB_Indicator
class for controlling an RGB LED with various patterns and colors using an Arduino.
- Arduino board
- RGB LED connected to pins 9, 10, and 11 (or modify the pins as needed)
- Required libraries:
FreeRTOS
for task managementArduino.h
for basic Arduino functions
PDL_RGB_Indicator.h
: Header file containing theRGB_Indicator
class and related structures.PDL_RGB_Indicator.cpp
: Implementation file for theRGB_Indicator
class.Test_RGB_Indicator.ino
: Arduino sketch for testing theRGB_Indicator
class.
- Download the project files and place them in your Arduino library folder.
- Open
Test_RGB_Indicator.ino
in the Arduino IDE. - Connect your Arduino board to your computer.
- Select the appropriate board and port in the Arduino IDE.
- Upload the sketch to your Arduino board.
The Test_RGB_Indicator.ino
sketch will perform the following tests:
- Test setting RGB values to various colors (red, green, blue, custom).
- Test setting different predefined patterns (RED_BLINK, RAINBOW, OFF).
- Test setting different ramp rates for color transitions.
Observe the behavior of the RGB LED connected to your Arduino board to verify the functionality of the RGB_Indicator
class.
- Modify the
TEST_PIN_R
,TEST_PIN_G
, andTEST_PIN_B
constants inTest_RGB_Indicator.ino
to match your specific hardware setup. - Add or modify predefined patterns and colors in
PDL_RGB_Indicator.h
to suit your needs.
This project is licensed under the MIT License - see the LICENSE file for details.
- The
FreeRTOS
library for providing task management capabilities. - The Arduino community for their continuous support and contributions.
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
For any questions or suggestions, please open an issue in the GitHub repository.