Showing Page:
1/6
ARDUINO LAB 02
Group Members
Ali Kamran
Eilad Tariq
Abdul Moiz Ahsan
Israr Khan
Hardware Used:
1- Arduino Uno
2- 8*8 led matrix
3- IR sensor
Task 1 : Show a Smiley Face on 8*8 led matrix.
CODE:
#include <MaxMatrix.h>
int DIN = 7; // DIN pin of MAX7219 module
int CLK = 6; // CLK pin of MAX7219 module
int CS = 5; // CS pin of MAX7219 module
int maxInUse = 1;
MaxMatrix m(DIN, CS, CLK, maxInUse);
char smile01[] = {8, 8,
B00111100,
B01000010,
B10010101,
B10100001,
B10100001,
B10010101,
B01000010,
B00111100
};
void setup() {
m.init(); // MAX7219 initialization
m.setIntensity(8); // initial led matrix intensity, 0-15
}
void loop() {
Showing Page:
2/6
m.clear();
// Displaying the character at x,y (upper left corner of the character)
m.writeSprite(0, 0, smile01);
delay(2000);
m.clear();*/
}
OUTPUT
TASK 2 : Scroll the smiley face on led matrix.
CODE:
#include <MaxMatrix.h>
int DIN = 7; // DIN pin of MAX7219 module
int CLK = 6; // CLK pin of MAX7219 module
int CS = 5; // CS pin of MAX7219 module
int maxInUse = 1;
MaxMatrix m(DIN, CS, CLK, maxInUse);
char smile01[] = {8, 8,
B00111100,
B01000010,
B10010101,
B10100001,
B10100001,
B10010101,
B01000010,
B00111100
};
void setup() {
m.init(); // MAX7219 initialization
Showing Page:
3/6