Advertisement
Guest User

Untitled

a guest
Jan 21st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. #include <LiquidCrystal_I2C.h>
  2. #include <DallasTemperature.h>
  3. #include <OneWire.h>
  4.  
  5. // Data wire is conntec to the Arduino digital pin 2
  6. #define ONE_WIRE_BUS 2
  7.  
  8. // Setup a oneWire instance to communicate with any OneWire devices
  9. OneWire oneWire(ONE_WIRE_BUS);
  10.  
  11. // Pass our oneWire reference to Dallas Temperature sensor
  12. DallasTemperature sensors(&oneWire);
  13.  
  14. void setup(void)
  15. {
  16. // Start serial communication for debugging purposes
  17. Serial.begin(9600);
  18. // Start up the library
  19. sensors.begin();
  20. LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
  21.  
  22. lcd.init(); //initialize the lcd
  23. lcd.backlight(); //open the backlight
  24. lcd.home();
  25.  
  26. lcd.print("Hello world...");
  27. lcd.setCursor(0,1);
  28. lcd.print("Ms. Brace rocks");
  29. delay(2000);
  30.  
  31. lcd.home();
  32. lcd.print("Good-bye world...");
  33. lcd.setCursor(0,1);
  34. lcd.print("Ms. Brace lives");
  35. delay(2000);
  36. }
  37.  
  38. void loop()
  39. {
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement