Sensor-Dot Matrix-S2

From Microduino Wiki
Revision as of 06:06, 19 September 2016 by Fengfeng (talk) (Created page with "{{Language|Microduino-Dot Matrix-S2}} {| style="width: 800px;" |- | thumb|400px|right Microduino-Dot Matrix-S2的产品编号是:'''MSDL32'''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Language: English  • 中文

Microduino-Dot Matrix-S2的产品编号是:MSDL32

Microduino-Dot Matrix-S2 is a 8x8 single color LED dot matrix displaying module, which can be used singly or by the cascade of multiple(combine into different shapes), to display text or images, or even simple animation.

Features

  • 8x8 dot matrix, the size is 32mm*32mm
  • The brightness of each point is 32-grade adjustable
  • Supports IIC communication protocol, the IIC address is settable(1~64), and the dot matrix sequence adopts rectangular plane coordinate system.
  • With 2 IIC interfaces onboard, which make the cascade of multiple dot matrix easy.

Specification

  • Sensor voltage
    • 5V working voltage
  • Sensor current
    • 300mA at most
  • Sensor size
    • Size of the board: 60mm*60mm
    • 1.27mm-spacing 4Pin interface connected with sensorhub
  • Function description
    • 8x8 dot matrix
    • The brightness of each point is 32-grade adjustable
  • Supports IIC communication protocol, the IIC address is settable(1~64), and the dot matrix sequence adopts rectangular plane coordinate system.
  • With 2 IIC interfaces onboard, which make the cascade of multiple dot matrix easy.
  • Connection
    • This sensor can be connected to the I2C interface of the core.
    • The cascade of multiple sensors is supported, 64 at most.

Documents

Development

Program Download

Programming

  • Follow the Software Getting Started Guide.
  • Select the Board, Processor and Port.
  • Click [File]->[Open], browse to the project program address, and click "Dot Matrix-S2.ino" to open the program.
  • After confirming all these items are correct, click "→" to download the program to the development board.

Hardware Setup

  • Referring to the following diagram, connect the Sensor-Dot Matrix-S2 to the I2C interface of Microduino-Sensorhub.


Microduino-sensorhub I2C.JPG


Method to Set the Address of the Dot Matrix

  • The range of the address of the dot matrix is 1~64.
  • After being powered, the number of the green points displayed on the dot matrix represents the address of the dot matrix.
  • During 3s after the dot matrix is powered, pressing the button on the back can enter address configuration state, and at this time, the dot matrix changes into white.
    • Pressing the button slowly (the interval is larger than 0.5s)will add the address
    • Pressing the button quickly(the interval is less than 0.5s)will reduce the address
  • After setting the address, long press the button for 3s, to exit the address configuration state.

Introduction of the Code

  • Define the IIC address of single dot matrix.
 uint8_t Addr[MatrixPix_X][MatrixPix_Y] = {  //1x1
   { 64}
 };
  • Define the IIC address of 2x2 cascade dot matrix.
 uint8_t Addr[MatrixPix_X][MatrixPix_Y] = {  //2x2
   { 64, 63},
   { 62, 61}
 };
  • Define the IIC address of 1x4 cascade dot matrix.
 uint8_t Addr[MatrixPix_X][MatrixPix_Y] = {  //1x4
   { 64, 63, 62 , 61}
 };
  • Get the number of devices which have already been connected.
 int16_t getMatrixNum()
  • Get the IIC address of devices which have already been connected
 getDeviceAddr(_a)				//num
  • Get the number of the dot matrix on X axis.
 getWidth()
  • Get the number of the dot matrix on Y axis.
 getHeight()
  • Set the on or off of the dot matrix coordinate pixel
 setLed(_row, _col, _state)			//row, col, state
  • Set the brightness of the dot matrix coordinate pixel
 setLedBrightness(_row, _col, _value)	//row, col, value
  • Clear the screen
 clearDisplay()
  • Set the brightness of the dot matrix
 setBrightness(_value)			//value
  • The characters are displayed flowingly
 writeString(_c, _t, _col)			//[char*], time, col
  • Hex bitmap display
 drawBMP(_row, _col , _w, _h, logo)		//row, col, width, height, file
 drawBMP(_row, _col, logo)			//row, col, file
  • Use function to display a solid rectangle
 drawBox(_row, _col, _w, _h)			//row, col, width, height
  • Draw a solid rounded rectangle.
 drawRBox(_row, _col, _w, _h, _r)		//row, col, width, height, rad
  • Draw a hollow rectangle
 drawFrame(_row, _col, _w, _h)		//row, col, width, height
  • Draw a rounded hollow rounded rectangle
 drawRFrame(_row, _col, _w, _h, _r)		//row, col, width, height, rad
  • Draw a hollow circle.
 drawCircle(_row, _col, _r)			//row, col, rad
  • To draw a solid circle
 drawDisc(_row, _col, _r)			//row, col, rad
  • To draw a straight line
 drawLine(_row, _col, _row1, _col1)		//row start, col start, row end, col end

Application

Gallery