/********* 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: Scanner - Source Code compiled for: Arduino Mega - Source Code created on: 2023-11-02 18:10:38 - Source Code generated by: AlexWind ********* Pleasedontcode.com **********/ /****** DEFINITION OF LIBRARIES *****/ #include #include /****** SYSTEM REQUIREMENT 1 *****/ /* Connect two serial together and duplicate on Hw serial */ /****** FUNCTION PROTOTYPES *****/ void setup(void); void loop(void); /***** DEFINITION OF Software Serial *****/ const uint8_t SERIAL_PIN_SERIAL_TX_A0 = A0; const uint8_t SERIAL_PIN_SERIAL_RX_D6 = 6; // Replace D6 with 6 const uint8_t SERIAL_PIN_SERIAL_TX_A1 = A1; const uint8_t SERIAL_PIN_SERIAL_RX_A3 = A3; SoftwareSerial serial1(SERIAL_PIN_SERIAL_RX_D6, SERIAL_PIN_SERIAL_TX_A0); SoftwareSerial serial2(SERIAL_PIN_SERIAL_RX_A3, SERIAL_PIN_SERIAL_TX_A1); void setup(void) { // Put your setup code here, to run once: Serial.begin(9600); // Initialize the hardware serial communication serial1.begin(300); // Initialize the software serial 1 serial2.begin(300); // Initialize the software serial 2 } void loop(void) { // Put your main code here, to run repeatedly: }