Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <LiquidCrystal_I2C.h>
- #include <DallasTemperature.h>
- #include <OneWire.h>
- // Data wire is conntec to the Arduino digital pin 2
- #define ONE_WIRE_BUS 2
- // Setup a oneWire instance to communicate with any OneWire devices
- OneWire oneWire(ONE_WIRE_BUS);
- // Pass our oneWire reference to Dallas Temperature sensor
- DallasTemperature sensors(&oneWire);
- void setup(void)
- {
- // Start serial communication for debugging purposes
- Serial.begin(9600);
- // Start up the library
- sensors.begin();
- }
- LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
- {
- lcd.init(); //initialize the lcd
- lcd.backlight(); //open the backlight
- lcd.home();
- lcd.print("Hello world...");
- lcd.setCursor(0,1);
- lcd.print("Ms. Brace rocks");
- delay(2000);
- lcd.home();
- lcd.print("Good-bye world...");
- lcd.setCursor(0,1);
- lcd.print("Ms. Brace lives");
- delay(2000);
- }
- void loop()
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement