Advertisement
pleasedontcode

Analog Display rev_01

Apr 30th, 2024
101
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: Analog Display
  13.     - Source Code NOT compiled for: ESP32 DevKit V1
  14.     - Source Code created on: 2024-04-30 15:57:26
  15.  
  16. ********* Pleasedontcode.com **********/
  17.  
  18. /****** SYSTEM REQUIREMENTS *****/
  19. /****** SYSTEM REQUIREMENT 1 *****/
  20.     /* esp32, i2c 16x2 display, applicazione per gestire */
  21.     /* una centrale termica con caldaia legna e accumulo, */
  22.     /* con il controllo della temperatura nella parte */
  23.     /* bassa e parte alta della caldaia e del accumulo */
  24.     /* usando 4 sensori di temperatura ntc b3950. */
  25. /****** END SYSTEM REQUIREMENTS *****/
  26.  
  27. /****** DEFINITION OF LIBRARIES *****/
  28. #include <Wire.h>
  29. #include <LiquidCrystal_I2C.h>
  30.  
  31. /****** FUNCTION PROTOTYPES *****/
  32. void setup(void);
  33. void loop(void);
  34.  
  35. /***** DEFINITION OF ANALOG INPUT PINS *****/
  36. const uint8_t sondaPin_PIN_D4 = 4;
  37.  
  38. /***** DEFINITION OF I2C PINS *****/
  39. const uint8_t lcd_LCD1602I2C_I2C_PIN_SDA_D21 = 21;
  40. const uint8_t lcd_LCD1602I2C_I2C_PIN_SCL_D22 = 22;
  41. const uint8_t lcd_LCD1602I2C_I2C_SLAVE_ADDRESS = 39;
  42.  
  43. LiquidCrystal_I2C lcd(lcd_LCD1602I2C_I2C_SLAVE_ADDRESS, 16, 2);
  44.  
  45. void setup(void)
  46. {
  47.   // put your setup code here, to run once:
  48.   pinMode(sondaPin_PIN_D4, INPUT);
  49.  
  50.   lcd.init(); // Initialize the LCD
  51.   lcd.backlight(); // Turn on the backlight
  52. }
  53.  
  54. void loop(void)
  55. {
  56.   // put your main code here, to run repeatedly:
  57.  
  58. }
  59.  
  60. /* END CODE */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement