Difference between revisions of "Sensor-Dot Matrix-S2"

From Microduino Wiki
Jump to: navigation, search
(Created page with "{{Language|Microduino-Dot Matrix-S2}} {| style="width: 800px;" |- | thumb|400px|right Microduino-Dot Matrix-S2的产品编号是:'''MSDL32'''...")
 
 
(5 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
|
 
|
 
[[file:Dot Matrix-S2front.jpg|thumb|400px|right]]
 
[[file:Dot Matrix-S2front.jpg|thumb|400px|right]]
Microduino-Dot Matrix-S2的产品编号是:'''MSDL32'''
+
The product number of Microduino-Dot Matrix-S2 is: '''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.
 
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.
Line 15: Line 15:
  
 
==Specification==
 
==Specification==
 +
{{ST_Pinout
 +
|st_name=Color Dot Matrix S2
 +
|pin3=IIC SDA
 +
|pin4=IIC SCL
 +
}}
 +
 
*Sensor voltage
 
*Sensor voltage
 
**5V working voltage
 
**5V working voltage
Line 27: Line 33:
 
**8x8 dot matrix  
 
**8x8 dot matrix  
 
**The brightness of each point is 32-grade adjustable
 
**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.  
+
**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.
+
**With 2 IIC interfaces onboard, which make the cascade of multiple dot matrix easy.
  
 
*Connection
 
*Connection
 
**This sensor can be connected to the I2C interface of the core.  
 
**This sensor can be connected to the I2C interface of the core.  
**The cascade of multiple sensors is supported, 64 at most.  
+
**The cascade of multiple sensors is supported, 64 at most.
  
 
==Documents==
 
==Documents==
*Schematic diagram: [[File:Dot Matrix-S2.zip]]
+
*Schematic diagram: [[File:Sensor-Dot Matrix-S2 Test.zip]]
 
*You can experiment with the sample programs in the following IDE libraries on your own : [https://github.com/wasdpkj/Microduino-IDE-Support/tree/master/arduino-ide-Support/%5B1.6.x%5D-hardware(library)/hardware/Microduino/avr/libraries '''_01_Microduino_DotMatrix''']
 
*You can experiment with the sample programs in the following IDE libraries on your own : [https://github.com/wasdpkj/Microduino-IDE-Support/tree/master/arduino-ide-Support/%5B1.6.x%5D-hardware(library)/hardware/Microduino/avr/libraries '''_01_Microduino_DotMatrix''']
  
 
==Development==
 
==Development==
 
===Program Download===
 
===Program Download===
*Download and unzip the program '''[[File:Dot Matrix-S2.zip]]'''
+
*Download and unzip the program '''[[File:Sensor-Dot Matrix-S2 Test.zip]]'''
 +
 
 
===Programming===
 
===Programming===
 
{{Upload
 
{{Upload
Line 104: Line 111:
 
   setBrightness(_value) //value
 
   setBrightness(_value) //value
  
*The characters are displayed flowingly
+
*The characters are displayed as follow
 
   writeString(_c, _t, _col) //[char*], time, col
 
   writeString(_c, _t, _col) //[char*], time, col
  

Latest revision as of 06:34, 4 August 2017

Language: English  • 中文

The product number of Microduino-Dot Matrix-S2 is: 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 backpin.png

Color Dot Matrix S2
General Pin Out Sensor / Trinket's Pin Out
PIN1 (GND) GND
PIN2 (VCC) VCC
PIN3 (SIGNAL-A) IIC SDA
PIN4 (SIGNAL-B) IIC SCL
  • General Pin Out is the standard pin out of a Sensor / Trinket connector.
  • Sensor / Trinket's Pin Out is this specific Sensor / Trinket's wiring in relation to the General Pin Out.
  • SIGNAL-A / SIGNAL-B are signals that could be digital input, digital output, analog input or analog output. Or special signals such as serial communication (SoftwareSerial, IIC (I2C), etc) or other special signals.
  • Not Connected refers to the Pin not being used for this particular Sensor / Trinket.
  • Read more about the hub module.
  • 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 as follow
 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