Monday, November 14, 2016

Mini Project 2 Update 2/5

     After trying to get the larger LCD screen to work (and contacting the website's support system) I still could not get the screen to light up and work. Because of time, I am going to use the smaller LCD screen again.

I am still using Project 23 from the Beginning Arduino book as a reference for my code. There are examples on how to move the code so while looking at that structure, I started writing my own to test it out (and it works):

 #include <LiquidCrystal.h> //library
  LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //pin assignment

void setup() {
 lcd.begin(16,2);

}

void loop() {
  //options
  intro();
  second();
 
}

void intro(){
  lcd.clear();
  lcd.setCursor(14,0);
  lcd.print("Once upon");
  lcd.setCursor(16,1);
  lcd.print("a time...");
  delay(100);
    for(int x=0; x<16; x++){
      lcd.scrollDisplayLeft();
      delay(450);
      }
}
     
 void second(){
  lcd.clear();
  lcd.setCursor(14,0);
  lcd.print("there was a");
  lcd.setCursor(16,1);
  lcd.print("girl...");
  delay(100);
    for(int x=0; x<16; x++){
      lcd.scrollDisplayLeft();
      delay(450);
      }
  }

I am still trying to decide what text I want to display. I will be looking at poems and well known stories as a reference, but I might end up writing my own story for this mini project. I am still experimenting with having the text move from left to right- right to left. I am also still playing with the timer within the code to make sure the sentences are legible.

_______________________________
resources I have used so far:

https://code.google.com/archive/p/glcd-arduino/downloads

https://www.sparkfun.com/datasheets/LCD/GDM12864H.pdf ***

http://users.ece.utexas.edu/~valvano/Datasheets/ADM12864H.pdf

http://www.arduinoecia.com.br/2015/12/relogio-arduino-display-128x64-rtc-ds3231.html ***

http://nicuflorica.blogspot.ro/2013/01/arduino-si-un-afisaj-lcd-clasic-16.html

No comments:

Post a Comment