Class began with the new lab and Professor Mason introduced the LCD shield for the Arduino board. The LCD consists of 16 column and 2 rows to display characters on and also has buttons built in that can be programmed to your liking. The potentiometer at the top right corner of the board is to adjust the contrast of the screen. The data pins 4-7 are used to transmit data. Using the LiquidCrystal.h library allows the user to use set functions to make it user friendly and easy to interface.
 |
| (LCD displaying Engr-6 and increasing progress bar) |
 |
| (a snap shot of the code for using the LCD in lab) |
After messing with the LCD screen, we went on to talk about data files in lecture. Data files allow you the ability of analyzing large data sets and store the information on a file that the program can access. Utilizing an online compiler like Repl.it won't allow the creating and storing of data files since its in a directory the program may not have access to. Using an IDE like Virtual-C allows the user to create and store data files locally for ease of access. In order to access data files you must use a pointer "*" to reference the file in the program. A pointer is a variable whose value is the memory address of another variable, like the memory address. Reading data files is fairly straight forward with calling to them by name and with an "fopen" statement to associate the file with its pointer.
No comments:
Post a Comment