Advertisement
pleasedontcode

Serial Transmitter rev_06

Dec 10th, 2023
72
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: Serial Transmitter
  13.     - Source Code compiled for: Arduino Nano
  14.     - Source Code created on: 2023-12-10 17:10:36
  15.  
  16. ********* Pleasedontcode.com **********/
  17.  
  18. /****** SYSTEM REQUIREMENTS *****/
  19. /****** SYSTEM REQUIREMENT 1 *****/
  20.     /* transmit the UUID of the HC05 */
  21. /****** END SYSTEM REQUIREMENTS *****/
  22.  
  23. /****** DEFINITION OF LIBRARIES *****/
  24. #include <Arduino.h>
  25. #include <SoftwareSerial.h>
  26.  
  27. /****** FUNCTION PROTOTYPES *****/
  28. void setup(void);
  29. void loop(void);
  30.  
  31. /***** DEFINITION OF Software Serial *****/
  32. const uint8_t HM10_HC05_mySerial_PIN_SERIAL_TX_A0 = A0;
  33. const uint8_t HM10_HC05_mySerial_PIN_SERIAL_RX_A1 = A1;
  34. const uint8_t HM10_HC05_mySerial_PIN_SERIAL_TX_A2 = A2;
  35. const uint8_t HM10_HC05_mySerial_PIN_SERIAL_RX_A3 = A3;
  36. const uint8_t HM10_HC05_mySerial_PIN_SERIAL_TX_A4 = A4;
  37. const uint8_t HM10_HC05_mySerial_PIN_SERIAL_RX_A5 = A5;
  38.  
  39. SoftwareSerial HM10_HC05_mySerial1(HM10_HC05_mySerial_PIN_SERIAL_RX_A1, HM10_HC05_mySerial_PIN_SERIAL_TX_A0);
  40. SoftwareSerial HM10_HC05_mySerial2(HM10_HC05_mySerial_PIN_SERIAL_RX_A3, HM10_HC05_mySerial_PIN_SERIAL_TX_A2);
  41. SoftwareSerial HM10_HC05_mySerial3(HM10_HC05_mySerial_PIN_SERIAL_RX_A5, HM10_HC05_mySerial_PIN_SERIAL_TX_A4);
  42.  
  43. void setup(void)
  44. {
  45.   // put your setup code here, to run once:
  46.  
  47.   HM10_HC05_mySerial1.begin(9600);
  48.   HM10_HC05_mySerial2.begin(9600);
  49.   HM10_HC05_mySerial3.begin(9600);
  50. }
  51.  
  52. void loop(void)
  53. {
  54.   // put your main code here, to run repeatedly:
  55.  
  56.   /****** SYSTEM REQUIREMENTS *****/
  57.  
  58.   /****** SYSTEM REQUIREMENT 1 *****/
  59.   /* transmit the UUID of the HC05 */
  60.  
  61.   HM10_HC05_mySerial1.print("UUID: XXXXXXXX"); // Replace "XXXXXXXX" with the actual UUID value
  62. }
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement