Arduino Alarm Clock Lab CTY SAR FCPS SHAWN

Arduino Alarm Clock Lab CTY SAR FCPS SHAWN LUPOLI, ELLIOT TAN

What are we working with?

How to illuminate an LED matrix An 8 x 8 LED matrix is given to us which has the ability to illuminate a number of it's inner diodes. By giving each column a positive and row a negative, a specific light will illuminate.

Arduino Knock Schematic

Goal When we run the program, the LED matrix will display lights

Programming “Alarm Clock”

Alarm Clock: Part 1 Initializing global variables Define an array for the columns and one for the rows Declare a two-dimensional array to store the binary signals for the illuminative output Setup() pin. Mode(pin, mode) configures the pin to behave either as an input or an output digital. Write(pin, voltage. Signal) assigns a voltage value to a specific pin (HIGH or LOW) iterate through the pixel matrix and send a positive voltage

Alarm Clock: Part 2 Loop() read. Sensors() analyses the current binary matrix and assigns respective values refresh. Screen() buffers the screen to update according to the two dimensional array read. Sensors() sets the current cursor positions to a positive voltage updates the cursor values using map()

Alarm Clock: Part 3 refresh. Screen() re-buffers the LED matrix and sets the voltage through iterating in the 2 D array sets the column value to HIGH sets the row value to LOW

Code Explanation The code to control the LED matrix was based on the notion of a two-dimensional binary matrix, which gives HIGH for a positive voltage and LOW for none. The global variables declared were an array for the columns and the rows, which allowed control of the specific elements. The two dimensional array for the matrix was then declared to optimize the procedure. The key to this problem was that to access a specific LED in the 8 x 8 matrix, we need to find it's column and row ID. We then set the column position to a positive voltage and the row position to a negative voltage. This will pinpoint a specific element within the matrix and turn it on. Using the

Code Explanation (continued) procedure previously mentioned in the presentation and the concept of the pinpointing, we should be able to elaborate on this and gain manipulation of the LED matrix.

Diagram of Alarm Clock
- Slides: 12