From CSclasswiki
Revision as of 15:43, 2 May 2020 by 270o (talk | contribs) (Images & Videos)
Jump to: navigation, search


Welcome to the Wiki Page of my Final Project for CSC270: Digital Circuits Systems. The purpose of this project is to create three configurations using various Elegoo Gadgets including a Mega2560 Arduino, Raspberry Pi and a 64-LED matrix. These configurations will each be able to execute a task as detailed in the outline.



The objectives explained in the Introduction will be achieved in 3 parts:

  1. Connect a 64-LED matrix display to a Mega2560 Arduino and program it to display my name, "L I Z E T T E".
  1. Demonstrate a master - worker model by establishing an i2c link between a Raspberry Pi and a Mega2560 Arduino. The Raspberry Pi will send a word to the Arduino. The Arduino will implement a Atbash Cipher on the word, then send it back to the Raspberry Pi.
  1. Retrieve Seattle, Washington's current weather from using a Raspberry Pi. The Raspberry Pi will send it to the Arduino, which will display the data on the 64-LED matrix display.

I will be programming the Raspberry Pi and Arduino in C.


  1. Mega2560 Arduino
  2. Raspberry Pi 3
  3. 64-LED Matrix
  4. Breadboard
  5. Wires
  6. Resistors


Google Chrome LED Byte Generator: This is used to generate the byte array matrix for each letter that is displayed on the 64-LED matrix in Part 1.

Part 1: Connect and Program 64-LED matrix to Arduino


I followed the Arduino 8×8 LED Matrix Tutorial [1] to connect the 64-LED matrix to my Arduino. The five pins of the 64-LED matrix were wired to the Arduino where DIN, CS, and clock where wired to pins 12, 11, and 10, respectively and the VCC and GND pins were wired to GND and 5V of the Arduino.

Once everything was wired, I wrote a sketch that displays the letters of my name, LIZETTE, one at a time. The sketch declares the pins wired between the LED matrix and the Arduino and the hexadecimal bytes. The hexadecimal bytes were generated using a Google Chrome extension called LED Byte Generator [2]. A function, printByte(), prints a byte by lighting up the rows of the matrix according to its hexadecimal. All the bytes gets called by printByte() in the setup() as demonstrated in the video below. This sketch used a library called LedControl [3].

Images & Videos


 * Lizette Carpenter 
 * Part 64-LED Matrix and Arduino Configuration 
 * The 64-LED Matrix will display my name: "L I Z E T T E"
 * References: 
 * LED Control library: 
 * Google Chrome app: LED Byte Generator 

//Include the following library 
#include <LedControl.h>

//Declare the pins of the Arduino following how it is connected to the pins of the LED Matrix
int DIN = 12;
int CS = 11; 
int CLK = 10; 

//Declare the byte arrays which represent the letters that will display on the LED Matrix 
byte l[8] = {0x0,0x40,0x40,0x40,0x40,0x40,0x7e,0x0};
byte i[8] = {0x0,0x8,0x8,0x8,0x8,0x8,0x8,0x0};
byte z[8] = {0x0,0x7e,0x4,0x8,0x10,0x20,0x7e,0x0};
byte e[8] = {0x0,0x7c,0x40,0x7c,0x40,0x40,0x7c,0x0};
byte t[8] = {0x0,0x7f,0x8,0x8,0x8,0x8,0x8,0x0};
byte T[8] = {0x0,0x0,0xfe,0x10,0x10,0x10,0x10,0x10};

//Initialize the LED control library 
LedControl lc=LedControl(DIN, CLK, CS, 0);

void setup() {
  lc.shutdown(0, false); 

void loop() {







//Loops through each byte array and displays its corresponding letter to the LED Matrix. 
void printByte(byte character []) {
  int i = 0; 
  for (i = 0; i<8; i++) {
    lc.setRow(0, i, character[i]); 

Part 2: i2c link between Raspberry Pi to the Arduino


Images & Videos


Part 3: Combining Part 1 and Part 2


Images & Videos