Keyestudio Ks0428 Manual page 151

Table of Contents

Advertisement

www.keyestudio.com
pinMode(SCL_Pin,OUTPUT);
pinMode(SDA_Pin,OUTPUT);
//clear the display
//matrix_display(clear);
}
void loop(){
matrix_display(smile); // display smile face
}
// the function for dot matrix display
void matrix_display(unsigned char matrix_value[])
{
IIC_start();
// use the function of the data transmission start
condition
IIC_send(0xc0); //select address
for(int i = 0;i < 16;i++) //pattern data has 16 bits
{
IIC_send(matrix_value[i]); //convey the pattern data
}
IIC_end();
//end the transmission of pattern data
IIC_start();
IIC_send(0x8A); //display control, set pulse width to 4/16 s
151

Advertisement

Table of Contents
loading

Table of Contents