Advertisement
pleasedontcode

LCD Text rev_01

Apr 24th, 2024
78
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: LCD Text
  13.     - Source Code NOT compiled for: Arduino Uno
  14.     - Source Code created on: 2024-04-24 12:07:26
  15.  
  16. ********* Pleasedontcode.com **********/
  17.  
  18. /****** SYSTEM REQUIREMENTS *****/
  19. /****** SYSTEM REQUIREMENT 1 *****/
  20.     /* game vith guns */
  21. /****** END SYSTEM REQUIREMENTS *****/
  22.  
  23. /****** DEFINITION OF LIBRARIES *****/
  24. #include <Wire.h>
  25. #include <LiquidCrystal_I2C.h>  //https://github.com/marcoschwartz/LiquidCrystal_I2C
  26.  
  27. /****** FUNCTION PROTOTYPES *****/
  28. void setup(void);
  29. void loop(void);
  30.  
  31. /***** DEFINITION OF I2C PINS *****/
  32. const uint8_t hi_LCD1602I2C_I2C_PIN_SDA_A4      = A4;
  33. const uint8_t hi_LCD1602I2C_I2C_PIN_SCL_A5      = A5;
  34. const uint8_t hi_LCD1602I2C_I2C_SLAVE_ADDRESS       = 39;
  35.  
  36. /****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
  37. LiquidCrystal_I2C lcd(0x27, 20, 4);  // set the LCD address to 0x27 for a 20 chars and 4 line display
  38.  
  39. void setup(void)
  40. {
  41.     // put your setup code here, to run once:
  42.     lcd.init();                      // initialize the lcd
  43.     lcd.backlight();
  44.     lcd.setCursor(3, 0);
  45.     lcd.print("Hello, world!");
  46.     lcd.setCursor(2, 1);
  47.     lcd.print("Ywrobot Arduino!");
  48.     lcd.setCursor(0, 2);
  49.     lcd.print("Arduino LCM IIC 2004");
  50.     lcd.setCursor(2, 3);
  51.     lcd.print("Power By Ec-yuan!");
  52. }
  53.  
  54. void loop(void)
  55. {
  56.     // put your main code here, to run repeatedly:
  57. }
  58.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement