Advertisement
pleasedontcode

"Distance Finder" rev_01

Jan 12th, 2024
68
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: "Distance Finder"
  13.     - Source Code compiled for: Arduino Uno
  14.     - Source Code created on: 2024-01-12 13:22:17
  15.  
  16. ********* Pleasedontcode.com **********/
  17.  
  18. /****** SYSTEM REQUIREMENTS *****/
  19. /****** SYSTEM REQUIREMENT 1 *****/
  20.     /* find the distance */
  21. /****** SYSTEM REQUIREMENT 2 *****/
  22.     /* find the distance */
  23. /****** END SYSTEM REQUIREMENTS *****/
  24.  
  25. /****** DEFINITION OF LIBRARIES *****/
  26. #include <Arduino.h>
  27.  
  28. /****** FUNCTION PROTOTYPES *****/
  29. void setup(void);
  30. void loop(void);
  31. void find_distance_1();
  32. void find_distance_2();
  33.  
  34. /****** DEFINITION OF DIGITAL OUTPUT PINS *****/
  35. const uint8_t ultrasonic_HC_SR04_Trigger_PIN_D2 = 2;
  36. const uint8_t ultrasonic_HC_SR04_Trigger_PIN_D3 = 3;
  37.  
  38. /****** SYSTEM REQUIREMENTS *****/
  39.  
  40. /****** SYSTEM REQUIREMENT 1 *****/
  41. /* find the distance */
  42. void find_distance_1()
  43. {
  44.   // code to find the distance - system requirement 1
  45.   // ...
  46. }
  47.  
  48. /****** SYSTEM REQUIREMENT 2 *****/
  49. /* find the distance */
  50. void find_distance_2()
  51. {
  52.   // code to find the distance - system requirement 2
  53.   // ...
  54. }
  55.  
  56. void setup(void)
  57. {
  58.   // put your setup code here, to run once:
  59.  
  60.   pinMode(ultrasonic_HC_SR04_Trigger_PIN_D2, OUTPUT);
  61.   pinMode(ultrasonic_HC_SR04_Trigger_PIN_D3, OUTPUT);
  62.  
  63. }
  64.  
  65. void loop(void)
  66. {
  67.   // put your main code here, to run repeatedly:
  68.   find_distance_1();
  69.   find_distance_2();
  70.  
  71. }
  72.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement