1 / 11

LCD

LCD. LCD screens can be used by an Arduino to display numbers and text. Purpose. Wiring. The screens communicate over a specific protocol called I2C It uses two communications pins, SDA and SCL On UNO boards, the A4 and A5 pins perform this task. Wiring. Wiring.

hedyd
Download Presentation

LCD

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LCD

  2. LCD screens can be used by an Arduino to display numbers and text Purpose

  3. Wiring The screens communicate over a specific protocol called I2C It uses two communications pins, SDA and SCL On UNO boards, the A4 and A5 pins perform this task

  4. Wiring

  5. Wiring CIJE boards contain both: A4 and A5 SDA and SCL Either can be used

  6. Libraries LCD’s contain 1,000’s of tiny independently controlled pixels Coding these independently would be impossible Instead we use a library Libraries can contain vast amounts of sub-coding, easily accessible using simple keywords For example: Tell Arduino to print the letter “A”, and the library inserts the coding necessary to control those pixels

  7. Libraries The LCD library can be downloaded at theCIJE.org/Arduino

  8. Libraries The downloaded file, in the form of a zip file, must be installed

  9. Coding Within the void loop(), some commands you can use are: lcd.backlight(); // will turn on the blue backlight lcd.noBacklight(); // will turn off the blue backlight lcd.clear(); // will clear the screen lcd.setCursor(0,0); // move the cursor to cord. (x,y) lcd.print("Hello"); // prints "Hello" lcd.print(x); // prints the value of x

  10. Coding Example If you had an integer "x" and it was equal to 96: lcd.clear(); lcd.setCursor(0,0); lcd.print("Hello, ARDUINO"); lcd.setCursor(0,1); lcd.print(x); Would display:

  11. LAB Complete the LCD lab

More Related