Advertisement
zombieslaya589

Untitled

Jan 21st, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 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. }
  21.  
  22.  
  23. LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
  24.  
  25. {
  26. lcd.init(); //initialize the lcd
  27. lcd.backlight(); //open the backlight
  28. lcd.home();
  29.  
  30. lcd.print("Hello world...");
  31. lcd.setCursor(0,1);
  32. lcd.print("Ms. Brace rocks");
  33. delay(2000);
  34.  
  35. lcd.home();
  36. lcd.print("Good-bye world...");
  37. lcd.setCursor(0,1);
  38. lcd.print("Ms. Brace lives");
  39. delay(2000);
  40. }
  41.  
  42. void loop()
  43. {
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement