/********* 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: "Digital Output"
- Source Code compiled for: Arduino Nano
- Source Code created on: 2024-04-20 05:44:23
********* Pleasedontcode.com **********/
/****** SYSTEM REQUIREMENTS *****/
/****** SYSTEM REQUIREMENT 1 *****/
/* 6 inputs turn on or off a relay on the outputs */
/****** END SYSTEM REQUIREMENTS *****/
/****** DEFINITION OF LIBRARIES *****/
/******************************************************************************/
/****** SYSTEM REQUIREMENTS *****/
/************ SYSTEM REQUIREMENT 1 ************/
/* 6 inputs turn on or off a relay on the outputs */
/***********************************************/
/****** FUNCTION PROTOTYPES *****/
void setup(void);
void loop(void);
void updateOutputs(void);
/***** DEFINITION OF DIGITAL OUTPUT PINS *****/
const uint8_t r1_PIN_D3 = 3;
const uint8_t r2_PIN_D4 = 4;
const uint8_t r3_PIN_D5 = 5;
const uint8_t r4_PIN_D6 = 6;
const uint8_t r5_PIN_D7 = 7;
/***** DEFINITION OF OUTPUT RAW VARIABLES *****/
/***** used to store raw data *****/
bool r1_PIN_D3_rawData = 0;
bool r2_PIN_D4_rawData = 0;
bool r3_PIN_D5_rawData = 0;
bool r4_PIN_D6_rawData = 0;
bool r5_PIN_D7_rawData = 0;
/***** DEFINITION OF OUTPUT PHYSICAL VARIABLES *****/
/***** used to store data after characteristic curve transformation *****/
float r1_PIN_D3_phyData = 0.0;
float r2_PIN_D4_phyData = 0.0;
float r3_PIN_D5_phyData = 0.0;
float r4_PIN_D6_phyData = 0.0;
float r5_PIN_D7_phyData = 0.0;
void setup(void)
{
// put your setup code here, to run once:
pinMode(r1_PIN_D3, OUTPUT);
pinMode(r2_PIN_D4, OUTPUT);
pinMode(r3_PIN_D5, OUTPUT);
pinMode(r4_PIN_D6, OUTPUT);
pinMode(r5_PIN_D7, OUTPUT);
}
void loop(void)
{
// put your main code here, to run repeatedly:
updateOutputs(); // Refresh output data
}
void updateOutputs(void)
{
digitalWrite(r1_PIN_D3, r1_PIN_D3_rawData);
digitalWrite(r2_PIN_D4, r2_PIN_D4_rawData);
digitalWrite(r3_PIN_D5, r3_PIN_D5_rawData);
digitalWrite(r4_PIN_D6, r4_PIN_D6_rawData);
digitalWrite(r5_PIN_D7, r5_PIN_D7_rawData);
}
/************ END CODE ************/