Instructions for Me LED Matrix 8×16 Module 1. Module introduction Operating voltage: 5V DC Communication interface: Double digital interface (blue label). The LED Matrix can be connected to interface 1, 2, 3, and 4 of mCore and connected to interface 3, 4, 5, and 6 of Orion. Baseboard can be connected with interface 3, 4, 5, 6, 7, and 8.
Assembly:
Application: The module is an 8X16 LED matrix screen composed of 16 horizontal and 8 vertical blue LED lamps. Through turning on or off LED lamps, certain basic figures, letters, and simple patterns can be showed. See the following diagram. 2. Instructions 2.
drawBitmap Bitmap (lattice diagram) show function; Public function drawStr Character string show function; Public function showClock Clock show function Public function showStr Character strings show function Private function Introduction of functions performance 1.
Returned value N/A Prerequisite N/A Called function writeByte ( ); // function of writing a single-byte; setBrightness ( ); // Brightness setting function; clearScreen ( ); // Screen clearing function; Return to library function list→ 3. MeLEDMatrix Constructor 3 Function name MeLEDMatrix Function object MeLEDMatrix (uint8_t SCK_Pin,uint8_t DIN_Pin); Performanc e description Constructor.
Returned value N/A Prerequisite N/A Called function writeBytesToAddress ( ); // Write certain bytes to specified address; Return to library function list→ 5. setBrightness Function name setBrightness Function object void setBrightness (uint8_tBright); Performanc e description Brightness setting function Input parameters Bright: Brightness parameters.
Remarks: <1> Default of color parameter system of LED lattice screen is 1 (showing diagram with lighting lamps); <2> clearScreen( ), after screen clearing function is called, the color parameter will be reset as 1; Returned value N/A Prerequisite N/A Called function N/A Return to library function list→ 7.
Character strings height is fixed as 8 (pixel); Input parameters X_position: Bottom left corner X-coordinate of first character of strings Value range: The smallest value is decided by length of character strings, The biggest value: 16 Y_position: Bottom left corner Y-coordinate of first character of strings Value range: -1 ~ 15; str: Starting address of character strings buffer area (array) to be shown; Returned value N/A Prerequisite N/A Called function showStr (); // Character strings show functi
#include #include #include //MeBoard myBoard(MakeblockOrion); MeBoard myBoard(mBot); MeLEDMatrix Matrix_1(PORT_4); char string_data[]="MAKEBLOCK 012345678"; uint8_t Bitmap_Heart[16]= { 0x00,0x38,0x44,0x42,0x21,0x21,0x42,0x44,0x38,0x44,0x42,0x21,0x21,0x42,0x44,0x38, }; int move_times = sizeof(string_data)*6; void setup() { Matrix_1.setBrightness(Brightness_8);// } void loop() { /**************************** Example 1****************************/ Matrix_1.
Matrix_1.drawBitmap(0, 0, sizeof(Bitmap_Heart), Bitmap_Heart); for(uint8_t k=0; k<3; k++) { for(uint8_t i=0;i<8;i++) { Matrix_1.setBrightness(i); delay(100); } for(uint8_t i=7;i>0;i--) { Matrix_1.setBrightness(i); delay(100); } } *************************** Example 2***************************************/ /*************************************** Example 3************************************** for(int16_t i=0; imove_times)i=0; Matrix_1.
2.2 mBlock programming Step 1 , After you connect with USB cable and turn on the mBot, you need to choose the serial port first.
Script block introduction: 1) Input characters Parameter: “Port1” - Choose the corresponding port you have connected the LED Matrix to. “x:0” - Set the x coordinate as 0. “y:0” - Set the y coordinate as 0. “characters:Hello” - Set the showing characters as Hello.
2) Input time Parameter: “Port1” - Choose the corresponding port you have connected the LED Matrix to. About hour&min - Set the showing characters as current time. 3) User-defined characters and patterns Click plotting area and the following plotting panel will be popped-up.
Select LED lamps that you want to turn on and click will be popped-up.