/********* Pleasedontcode.com **********
Pleasedontcode thanks you for automatic code generation! Enjoy your code!
- Terms and Conditions:
You have a non-exclusive, revocable, worldwide, royalty-free license
for personal and commercial use. Attribution is optional; modifications
are allowed, but you're responsible for code maintenance. We're not
liable for any loss or damage. For full terms,
please visit pleasedontcode.com/termsandconditions.
- Project: **RGB Control**
- Source Code NOT compiled for: Arduino Uno
- Source Code created on: 2025-02-13 16:01:41
********* Pleasedontcode.com **********/
/****** SYSTEM REQUIREMENTS *****/
/****** SYSTEM REQUIREMENT 1 *****/
/* */
/****** END SYSTEM REQUIREMENTS *****/
/* START CODE */
/****** DEFINITION OF LIBRARIES *****/
#include
#include // Include Wire library for I2C communication
/****** FUNCTION PROTOTYPES *****/
void setup(void);
void loop(void);
void updateOutputs(void); // Function prototype for updateOutputs
/***** DEFINITION OF DIGITAL OUTPUT PINS *****/
const uint8_t myRGBLED_LEDRGB_Red_PIN_D2 = 2;
const uint8_t myRGBLED_LEDRGB_Green_PIN_D3 = 3;
const uint8_t myRGBLED_LEDRGB_Blue_PIN_D4 = 4;
/***** DEFINITION OF OUTPUT RAW VARIABLES *****/
/***** used to store raw data *****/
bool myRGBLED_LEDRGB_Red_PIN_D2_rawData = 0;
bool myRGBLED_LEDRGB_Green_PIN_D3_rawData = 0;
bool myRGBLED_LEDRGB_Blue_PIN_D4_rawData = 0;
/***** DEFINITION OF OUTPUT PHYSICAL VARIABLES *****/
/***** used to store data after characteristic curve transformation *****/
float myRGBLED_LEDRGB_Red_PIN_D2_phyData = 0.0;
float myRGBLED_LEDRGB_Green_PIN_D3_phyData = 0.0;
float myRGBLED_LEDRGB_Blue_PIN_D4_phyData = 0.0;
void setup(void)
{
// put your setup code here, to run once:
pinMode(myRGBLED_LEDRGB_Red_PIN_D2, OUTPUT);
pinMode(myRGBLED_LEDRGB_Green_PIN_D3, OUTPUT);
pinMode(myRGBLED_LEDRGB_Blue_PIN_D4, OUTPUT);
}
void loop(void)
{
// put your main code here, to run repeatedly:
updateOutputs(); // Refresh output data
}
void updateOutputs()
{
digitalWrite(myRGBLED_LEDRGB_Red_PIN_D2, myRGBLED_LEDRGB_Red_PIN_D2_rawData);
digitalWrite(myRGBLED_LEDRGB_Green_PIN_D3, myRGBLED_LEDRGB_Green_PIN_D3_rawData);
digitalWrite(myRGBLED_LEDRGB_Blue_PIN_D4, myRGBLED_LEDRGB_Blue_PIN_D4_rawData);
}
/* END CODE */