Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /********* 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: "LED Control"
- - Source Code NOT compiled for: Arduino Uno
- - Source Code created on: 2024-11-19 14:24:49
- ********* Pleasedontcode.com **********/
- /****** SYSTEM REQUIREMENTS *****/
- /****** SYSTEM REQUIREMENT 1 *****/
- /* if typed 1 in terminal then led turns on and if */
- /* typed 0 it goes off */
- /****** END SYSTEM REQUIREMENTS *****/
- /* START CODE */
- /****** DEFINITION OF LIBRARIES *****/
- #include <SoftwareSerial.h>
- /****** FUNCTION PROTOTYPES *****/
- void setup(void);
- void loop(void);
- void updateOutputs(void); // Added function prototype for updateOutputs
- /***** DEFINITION OF DIGITAL OUTPUT PINS *****/
- const uint8_t dede_LED_PIN_D2 = 2;
- const int ledPin = 13; // Added USER CODE for another LED pin
- /***** DEFINITION OF Software Serial *****/
- const uint8_t blueblue_HC05_mySerial_PIN_SERIAL_TX_A0 = A0;
- const uint8_t blueblue_HC05_mySerial_PIN_SERIAL_RX_A1 = A1;
- SoftwareSerial blueblue_HC05_mySerial(blueblue_HC05_mySerial_PIN_SERIAL_RX_A1, blueblue_HC05_mySerial_PIN_SERIAL_TX_A0);
- /***** DEFINITION OF OUTPUT RAW VARIABLES *****/
- /***** used to store raw data *****/
- bool dede_LED_PIN_D2_rawData = 0;
- /***** DEFINITION OF OUTPUT PHYSICAL VARIABLES *****/
- /***** used to store data after characteristic curve transformation *****/
- float dede_LED_PIN_D2_phyData = 0.0;
- void setup(void)
- {
- // put your setup code here, to run once:
- pinMode(dede_LED_PIN_D2, OUTPUT);
- pinMode(ledPin, OUTPUT); // Set up the additional LED pin
- blueblue_HC05_mySerial.begin(9600);
- Serial.begin(9600); // Set baud rate to 9600 for Serial communication (added from USER CODE)
- }
- void loop(void)
- {
- // put your main code here, to run repeatedly:
- updateOutputs(); // Refresh output data
- if (Serial.available() > 0) { // Added from USER CODE
- char data = Serial.read(); // Read data from Serial
- if (data == '1') {
- digitalWrite(ledPin, HIGH); // Turn additional LED on
- } else if (data == '0') {
- digitalWrite(ledPin, LOW); // Turn additional LED off
- }
- }
- }
- void updateOutputs()
- {
- digitalWrite(dede_LED_PIN_D2, dede_LED_PIN_D2_rawData);
- }
- /* END CODE */
Advertisement
Comments
-
- https://pastebin.com/pkErZ3rk
- https://b2bservice.fatboy.com/hc/en-us/community/posts/22730610511506--For-100-QuiK-Help-How-Do-I-Contact-QuickBooks-Desktop-Support
- https://b2bservice.fatboy.com/hc/en-us/community/posts/22730695684754--Official-iNTUiT-How-Do-I-Contact-QuickBooks-Enterprise-Support
- https://b2bservice.fatboy.com/hc/en-us/community/posts/22730753993874--QB-Connect-What-is-the-QuickBooks-Payroll-Error-SuPPort-NumBer
- https://b2bservice.fatboy.com/hc/en-us/community/posts/22730796093330-Contact-Intuit-How-Do-I-Contact-QuickBooks-Payroll-Support-by-Phone-Number
- https://b2bservice.fatboy.com/hc/en-us/community/posts/22730777254930--QB-EXpert-Guide-What-Is-QuickBooks-Enterprise-Support-Number-Official-Support
- https://b2bservice.fatboy.com/hc/en-us/community/posts/22730832192530--QB-HELP-How-Do-I-Contact-Intuit-QuickBooks-Enterprise-Support-Number
- https://b2bservice.fatboy.com/hc/en-us/community/posts/22730849834514--FAQ-GUIDE-How-do-I-communicate-with-QuickBooks-Enterprise-Support
- https://b2bservice.fatboy.com/hc/en-us/community/posts/22730837448594--Intuit-Help-How-to-contact-Support-Enterprise-Support-Number-Support-TollFree
- https://network.propertyweek.com/members/JonsonBaba
- https://educat.xtec.cat/members/JonsonBaba
- https://www.ssplace.miami.edu/members/JonsonBaba
- https://sloan.ucr.edu/members/JonsonBaba
- https://zagspace.gonzaga.edu/members/JonsonBaba
Add Comment
Please, Sign In to add comment
Advertisement