Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Modded Code from http://www.mathias-wilhelm.de/arduino/download/
- */
- // include the library code:
- #include <LiquidCrystal.h>
- // initialize the library with the numbers of the interface pins
- //LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
- LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
- //
- const int ScrollTextLength = 11;
- String ScrollTextField[ScrollTextLength] = {
- " Chris ",
- " LOVES ",
- " Diana ",
- "Honey ",
- " Baby ",
- " Sweety ",
- " Pie ",
- " I love you! ",
- " Paradise ",
- "Poter! Porter! ",
- "Maine.......... ",};
- void setup() {
- // set up the lcd's number of columns and rows:
- lcd.begin(16, 2);
- Serial.begin(115200);
- }
- void loop() {
- delay(1000);
- ScrollText(1000);
- delay(2000);
- }
- void ScrollText (int sdelay) {
- String outp;
- int sline=0;
- for (int i=0; i<ScrollTextLength; i++) {
- sline=i;
- lcd.setCursor(0, 0);
- outp=ScrollTextField[sline];
- lcd.print(outp);
- sline=i+1;
- if (sline>=ScrollTextLength) sline = 0;
- lcd.setCursor(0, 1);
- outp=ScrollTextField[sline];
- lcd.print(outp);
- delay(sdelay);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement