Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /********* Pleasedontcode.com **********
- Pleasedontcode thanks you for automatic code generation! Enjoy your code!
- - Terms and Conditions:
- You have a non-exclusive, revocable, worldwide, royalty-free license
- for personal and commercial use. Attribution is optional; modifications
- are allowed, but you're responsible for code maintenance. We're not
- liable for any loss or damage. For full terms,
- please visit pleasedontcode.com/termsandconditions.
- - Project: LCD Text
- - Source Code NOT compiled for: Arduino Uno
- - Source Code created on: 2024-05-09 17:44:05
- ********* Pleasedontcode.com **********/
- /****** SYSTEM REQUIREMENTS *****/
- /****** SYSTEM REQUIREMENT 1 *****/
- /* This code will breathalyzer with a library liquid */
- /* cristal_I2c with address 0x27 and measurements of */
- /* 12x2 ; and make calculate the level of alcohol in */
- /* grams; with connections from MQ3 to Arduino= VCC */
- /* to 5V, 6ND to 6ND, A6 to A0; Arduino to LCD =6ND t */
- /****** END SYSTEM REQUIREMENTS *****/
- /****** DEFINITION OF LIBRARIES *****/
- #include <Wire.h>
- #include <LiquidCrystal_I2C.h> //https://github.com/marcoschwartz/LiquidCrystal_I2C
- /****** FUNCTION PROTOTYPES *****/
- void setup(void);
- void loop(void);
- /***** DEFINITION OF I2C PINS *****/
- const uint8_t display_LCD1602I2C_I2C_PIN_SDA_A4 = A4;
- const uint8_t display_LCD1602I2C_I2C_PIN_SCL_A5 = A5;
- const uint8_t display_LCD1602I2C_I2C_SLAVE_ADDRESS = 0x27;
- /****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
- LiquidCrystal_I2C lcd(0x27, 12, 2); // set the LCD address to 0x27 for a 12 chars and 2 line display
- void setup(void)
- {
- // put your setup code here, to run once:
- lcd.init(); // initialize the lcd
- lcd.backlight();
- lcd.setCursor(3, 0);
- lcd.print("Hello, world!");
- lcd.setCursor(2, 1);
- lcd.print("Ywrobot Arduino!");
- lcd.setCursor(0, 2);
- lcd.print("Arduino LCM IIC 2004");
- lcd.setCursor(2, 3);
- lcd.print("Power By Ec-yuan!");
- }
- void loop(void)
- {
- // put your main code here, to run repeatedly:
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement