pleasedontcode

Sensor Initialization rev_02

Jul 13th, 2025
134
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: Sensor Initialization
  13.     - Source Code compiled for: ESP32 DevKit V1
  14.     - Source Code created on: 2025-07-13 15:10:11
  15.  
  16. ********* Pleasedontcode.com **********/
  17.  
  18. /****** SYSTEM REQUIREMENTS *****/
  19. /****** SYSTEM REQUIREMENT 1 *****/
  20.     /* im using tfng driver this is reciver code of myn */
  21.     /* esp 32 reciver signals from manthoer esp32 which */
  22.     /* is connetcted to mpu6050 */
  23. /****** END SYSTEM REQUIREMENTS *****/
  24.  
  25.  
  26.  
  27. /* START CODE */
  28.  
  29. /****** DEFINITION OF LIBRARIES *****/
  30. #include <Wire.h>
  31. #include <MPU6050.h>    //https://github.com/electroniccats/mpu6050
  32.  
  33. /****** FUNCTION PROTOTYPES *****/
  34. void setup(void);
  35. void loop(void);
  36.  
  37. /***** DEFINITION OF DIGITAL INPUT PINS *****/
  38. const uint8_t gyro_MPU6050_Interrupt_PIN_D4     = 4;
  39.  
  40. /***** DEFINITION OF I2C PINS *****/
  41. const uint8_t gyro_MPU6050_I2C_PIN_SDA_D21      = 21;
  42. const uint8_t gyro_MPU6050_I2C_PIN_SCL_D22      = 22;
  43. const uint8_t gyro_MPU6050_I2C_SLAVE_ADDRESS        = 104;
  44.  
  45. /****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
  46.  
  47. void setup(void)
  48. {
  49.     // put your setup code here, to run once:
  50.  
  51.     pinMode(gyro_MPU6050_Interrupt_PIN_D4,  INPUT);
  52.  
  53. }
  54.  
  55.  
  56. void loop(void)
  57. {
  58.     // put your main code here, to run repeatedly:
  59.  
  60. }
  61.  
  62. /* END CODE */
  63.  
  64.  
Advertisement
Add Comment
Please, Sign In to add comment