/********* 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 19:40:28 - Source Code generated by: AlexWind ********* Pleasedontcode.com **********/ /****** DEFINITION OF LIBRARIES *****/ #include #include /****** SYSTEM REQUIREMENT 1 *****/ /* Use seril and dsfgds to pass TX and RX data */ /* between them. */ /****** SYSTEM REQUIREMENT 2 *****/ /* Seril TX data is passed to RX dsfgds. dsfgds TX */ /* data is passed to RX Seril. */ /****** FUNCTION PROTOTYPES *****/ void setup(void); void loop(void); /***** DEFINITION OF Software Serial *****/ const uint8_t seril_PIN_SERIAL_TX_A0 = A0; // Define the TX pin for seril const uint8_t seril_PIN_SERIAL_RX_D6 = 6; // Define the RX pin for seril const uint8_t dsfgds_PIN_SERIAL_TX_A1 = A1; // Define the TX pin for dsfgds const uint8_t dsfgds_PIN_SERIAL_RX_A3 = A3; // Define the RX pin for dsfgds SoftwareSerial seril(seril_PIN_SERIAL_RX_D6, seril_PIN_SERIAL_TX_A0); // Create seril object SoftwareSerial dsfgds(dsfgds_PIN_SERIAL_RX_A3, dsfgds_PIN_SERIAL_TX_A1); // Create dsfgds object void setup(void) { // put your setup code here, to run once: seril.begin(300); // Initialize seril dsfgds.begin(300); // Initialize dsfgds } void loop(void) { // put your main code here, to run repeatedly: // Pass data from seril TX to dsfgds RX if (seril.available()) { dsfgds.write(seril.read()); } // Pass data from dsfgds TX to seril RX if (dsfgds.available()) { seril.write(dsfgds.read()); } }