
27
This Crowtail-LED Matrix uses the HT16K33 which is a neat little
chip that has the ability to drive a multiplexed 8x8 matrix (that's 64
individual LED). We offer an LED matrix to you-blue. You need to
pay attention to that the driver can turn LED on and off but does not
have the ability to individually PWM dim them.
In this lesson, we will learn how to use Crowtail-LED Matrix to show
the string. Let’s use this module to make a billboard and show a
personal advertisement!
Lesson 13 – Matrix display
Introduction
Import the servo library. Servo.h is a wonderful library of the servo, it provides a very convenient
function to control rotation of servo.
Servo library: #include <Servo.h>
Create a servo object to control the servo. After import the servo library, we need to create a servo
object to tell that need to control servo.
Create servo instance: Servo myservo;
Declare which pin the servo is connected to. Different from the other modules which use variable to
initialize which pin them should be connected to, servo use ServoObject.attach() function to tell which
pin it is connected to. For example, our code is to connect the servo to D5 port.
Attach function: myservo.attach(5);
The Arduino for loop provides a mechanism to repeat a section of code depending on the value of a
variable. So you set the initial value of the variable, the condition to exit the loop (testing the variable),
and the action on the variable each time around the loop. Initialiser section: The initial value of the
control variable. Condition Section: The condition to stop the loop. Iterator Section: The loop variable
action (increment or decrement). In the first for() statement, we initialize pos to 0, then judge if the pos
less than 180, if yes, pos plus 1 and run the code in for statement.
For() statement: for (<initialiser code> ; <condition test expression> ; <iterator
expression>){code to be run if condition test expression is true }
Code usage
Summary of Contents for Crowtail
Page 48: ......