SHARE
TWEET

Untitled

a guest Nov 22nd, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <LiquidCrystal.h>
  2.  
  3. LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
  4.  
  5. void setup() {
  6.   // put your setup code here to run once
  7.   pinMode(BEEPER, OUTPUT);
  8.   lcd.begin(16,2);
  9.   delay(1000);
  10. }
  11.  
  12. void loop() {
  13.   lcd.setCursor(0,1);
  14.   delay(100);
  15. }
  16.  
  17. void clear(){
  18.   lcd.setCursor(0,1);
  19.   lcd.print("                ");
  20.   lcd.setCursor(0,2);
  21.   lcd.print("                ");
  22. }
  23.  
  24. void messages() {
  25.   char message;
  26.   char* message_list[] = {
  27.     "Message 1",
  28.     "Message 2",
  29.     };
  30.  
  31.   for(int x=0; x<20; x++) {
  32.     for(int i=0; i<32; i++) {
  33.       message = message_list[i];
  34.       clear();
  35.       lcd.setCursor(0,0);
  36.       lcd.print(message_list[i]);
  37.       delay(5000); // 5sec
  38.     }
  39.     clear();
  40.     delay(60000); // 1min
  41.   }
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top