Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Wire.h>
- #include <LiquidCrystal_I2C.h>
- //set the screen address to 0x27 for a 16 chars and 2 line desplay
- LiquidCrystal_I2C screen(0x3F, 16, 2);
- int tim=500;
- void setup() {
- //initialize the screen
- screen.begin();
- screen.setBacklight((uint8_t)1);
- }
- void loop() {
- screen.setCursor (15,0);//set the cursor to column 15, line 0
- screen.print ("YOU");
- screen.setCursor (15,1);
- screen.print ("WIN!!!");
- for(int position1=0; position1 < 26; position1++)
- {
- screen.scrollDisplayLeft (); //Scrolls the contents of the display
- delay (tim); //wait for 250 microseconds
- }
- screen.clear();// Clears the screen and positions the cursor
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement