Advertisement
pleasedontcode

Scanner rev_86

Nov 2nd, 2023
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /********* Pleasedontcode.com **********
  2.  
  3.     Pleasedontcode thanks you for automatic code generation! Enjoy your code!
  4.  
  5.     - Terms and Conditions:
  6.     You have a non-exclusive, revocable, worldwide, royalty-free license
  7.     for personal and commercial use. Attribution is optional; modifications
  8.     are allowed, but you're responsible for code maintenance. We're not
  9.     liable for any loss or damage. For full terms,
  10.     please visit pleasedontcode.com/termsandconditions.
  11.  
  12.     - Project: Scanner
  13.     - Source Code compiled for: Arduino Mega
  14.     - Source Code created on: 2023-11-02 18:10:38
  15.     - Source Code generated by: AlexWind
  16.  
  17. ********* Pleasedontcode.com **********/
  18. /****** DEFINITION OF LIBRARIES *****/
  19. #include <Arduino.h>
  20. #include <SoftwareSerial.h>
  21.  
  22. /****** SYSTEM REQUIREMENT 1 *****/
  23. /* Connect two serial together and duplicate on Hw serial */
  24.  
  25. /****** FUNCTION PROTOTYPES *****/
  26. void setup(void);
  27. void loop(void);
  28.  
  29. /***** DEFINITION OF Software Serial *****/
  30. const uint8_t SERIAL_PIN_SERIAL_TX_A0 = A0;
  31. const uint8_t SERIAL_PIN_SERIAL_RX_D6 = 6; // Replace D6 with 6
  32. const uint8_t SERIAL_PIN_SERIAL_TX_A1 = A1;
  33. const uint8_t SERIAL_PIN_SERIAL_RX_A3 = A3;
  34. SoftwareSerial serial1(SERIAL_PIN_SERIAL_RX_D6, SERIAL_PIN_SERIAL_TX_A0);
  35. SoftwareSerial serial2(SERIAL_PIN_SERIAL_RX_A3, SERIAL_PIN_SERIAL_TX_A1);
  36.  
  37. void setup(void)
  38. {
  39.   // Put your setup code here, to run once:
  40.  
  41.   Serial.begin(9600); // Initialize the hardware serial communication
  42.   serial1.begin(300); // Initialize the software serial 1
  43.   serial2.begin(300); // Initialize the software serial 2
  44. }
  45.  
  46. void loop(void)
  47. {
  48.   // Put your main code here, to run repeatedly:
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement