KS0475 Keyestudio 8*8 Dot Matrix Module 1088AS For Smart Car (Black and Eco-friendly): Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 2: Line 2:
== Description ==
== Description ==


In generally,we need 16 digital ports in total to drive an 8 * 8 dot matrix via MCU, which will greatly waste the MCU data. Thereby, we specially designed this module which uses an HT16K33 chip to drive an 8 * 8 dot matrix. You only need to control dot matrix via the I2C communication port of the MCU , which greatly saves the MCU resources.<br>
In generally,we need 16 digital ports in total to drive an 8 * 8 dot matrix via MCU, which will greatly waste the MCU data. Thereby, we could use HT16K33 chip to drive an 8 * 8 dot matrix, and control dot matrix via the I2C communication port of the MCU , which greatly saves the MCU resources.<br>




Line 46: Line 46:




Note:
<span style=color:red> Note:
1. In the experiment, we control dot matrix with code “matrix.displaybuffer[0] = B00000011”; <br>[[File:0475-7.png|200px|frameless|thumb]]<br>  ( connect dot matrix as shown)
1. In the experiment, we control dot matrix with code “matrix.displaybuffer[0] = B00000011”; <br>[[File:0475-7.png|100px|frameless|thumb]] ( connect dot matrix as shown)
For “matrix.displaybuffer[0]”, 0 stands for column,0 is the first column, 1 is the second column, and so on;”B00000011” stands for 8 LEDs on/off, 0 means off, 1 means on. Setting matrix.displaybuffer[0] = B00000011, which represents the first column, the LEDs on rows 1, 8, 7, 6, 5, and 4 are set to off, and the LEDs on rows 3 and 2 are set to light on.
For “matrix.displaybuffer[0]”, 0 stands for column,0 is the first column, 1 is the second column, and so on;”B00000011” stands for 8 LEDs on/off, 0 means off, 1 means on. Setting matrix.displaybuffer[0] = B00000011, which represents the first column, the LEDs on rows 1, 8, 7, 6, 5, and 4 are set to off, and the LEDs on rows 3 and 2 are set to light on.</span>




2. The library files need to be installed in the code, that is, put the Adafruit_GFX and Adafruit_LED_Backpack_Library_master folders into \ Arduino \ libraries under the compiler installation directory. After setting successfully, you need to restart the compiler, otherwise it will not compile.
<span style=color:red> 2. The library files need to be installed in the code, that is, put the Adafruit_GFX and Adafruit_LED_Backpack_Library_master folders into \ Arduino \ libraries under the compiler installation directory. After setting successfully, you need to restart the compiler, otherwise it will not compile.
For example mine: C: \ Program Files \ Arduino \ libraries
For example mine: C: \ Program Files \ Arduino \ libraries </span>


== Test Result ==
== Test Result ==
Line 59: Line 59:


== Resources ==
== Resources ==
Libraries and Test Code
https://fs.keyestudio.com/KS0475
==Buy from ==
*[https://www.keyestudio.com/keyestudio-single-one-channel-solid-state-relay-module-for-arduino-p0467-p0467.html    '''Official Website''']
*[https://www.aliexpress.com/store/product/Free-shiping-Single-One-Channel-Solid-State-Relay-Module-red-FOR-arduino/1452162_32317853280.html?spm=2114.12010615.8148356.5.592b40a3PwpKEs    '''Shop on aliexpress''' ]
*[https://www.amazon.com/dp/B07DRHBKFV  '''Shop on amazon''' ]
[[Category:Module]]

Latest revision as of 14:51, 16 January 2020


thumb


Description

In generally,we need 16 digital ports in total to drive an 8 * 8 dot matrix via MCU, which will greatly waste the MCU data. Thereby, we could use HT16K33 chip to drive an 8 * 8 dot matrix, and control dot matrix via the I2C communication port of the MCU , which greatly saves the MCU resources.


The interface of the module is led out by 4pin pins with a 2.54mm pitch. We could connect the module to control board with DuPont cable to communicate. When in use, we can fix the dot matrix screen on the smart car to make a status display.

Technical Parameters

  • Interface: 4pin pitch 2.54mm pin header
  • Working voltage: DC 4.5V-5.5V
  • Communication port: I2C communication
  • Control chip: HT16K33

Connection Diagram


thumb

Test Code

#include <Wire.h>
#include "Adafruit_LEDBackpack.h"
#include "Adafruit_GFX.h"
Adafruit_LEDBackpack matrix = Adafruit_LEDBackpack();
void setup() {
  Serial.begin(9600);
  Serial.println("HT16K33 test");
  
  matrix.begin(0x70);  // pass in the address
}

void loop() 
{
  /////////smile///////////////
    matrix.displaybuffer[0] = B00000011;
    matrix.displaybuffer[1] = B10000000;
    matrix.displaybuffer[2] = B00010011;
    matrix.displaybuffer[3] = B00100000;
    matrix.displaybuffer[4] = B00100000;
    matrix.displaybuffer[5] = B00010011;
    matrix.displaybuffer[6] = B10000000;
    matrix.displaybuffer[7] = B00000011;
    matrix.writeDisplay();
}


Note: 1. In the experiment, we control dot matrix with code “matrix.displaybuffer[0] = B00000011”;
thumb ( connect dot matrix as shown) For “matrix.displaybuffer[0]”, 0 stands for column,0 is the first column, 1 is the second column, and so on;”B00000011” stands for 8 LEDs on/off, 0 means off, 1 means on. Setting matrix.displaybuffer[0] = B00000011, which represents the first column, the LEDs on rows 1, 8, 7, 6, 5, and 4 are set to off, and the LEDs on rows 3 and 2 are set to light on.


2. The library files need to be installed in the code, that is, put the Adafruit_GFX and Adafruit_LED_Backpack_Library_master folders into \ Arduino \ libraries under the compiler installation directory. After setting successfully, you need to restart the compiler, otherwise it will not compile. For example mine: C: \ Program Files \ Arduino \ libraries

Test Result

Wire according to connection diagram, upload the code, and after power-on, the 8 * 8 dot matrix displays a smiley pattern, as shown below.
thumb

Resources

Libraries and Test Code

https://fs.keyestudio.com/KS0475

Buy from