Wiki

matrix.drawLine(0, 0, 31, 31, matrix.Color333(7, 0, 0));
matrix.drawLine(31, 0, 0, 31, matrix.Color333(7, 0, 0));
delay(500);
// draw a blue circle
matrix.drawCircle(10, 10, 10, matrix.Color333(0, 0, 7));
delay(500);
// fill a violet circle
matrix.fillCircle(21, 21, 10, matrix.Color333(7, 0, 7));
delay(500);
// fill the screen with 'black'
matrix.fillScreen(matrix.Color333(0, 0, 0));
// draw some text!
matrix.setCursor(1, 0); // start at top left, with one pixel of spacing
matrix.setTextSize(1); // size 1 == 8 pixels high
matrix.setTextWrap(false); // Don't wrap at end of line - will do ourselves
matrix.setTextColor(matrix.Color333(0,7,0));
matrix.println("green");
matrix.setTextColor(matrix.Color333(0,7,7));
matrix.println("robot");
// print each letter with a rainbow color
matrix.setTextColor(matrix.Color333(7,0,0));
matrix.print('3');
matrix.setTextColor(matrix.Color333(7,4,0));
matrix.print('2');
matrix.setTextColor(matrix.Color333(7,7,0));
matrix.print('x');
matrix.setTextColor(matrix.Color333(4,7,0));
matrix.print('3');
matrix.setTextColor(matrix.Color333(0,7,0));
matrix.println('2');
matrix.setTextColor(matrix.Color333(0,7,7));
matrix.print('*');
matrix.setTextColor(matrix.Color333(0,4,7));
matrix.print('R');
matrix.setTextColor(matrix.Color333(0,0,7));
matrix.print('G');
matrix.setTextColor(matrix.Color333(4,0,7));
matrix.print('B');
matrix.setTextColor(matrix.Color333(7,0,4));
matrix.print('*');
delay(5000);
}
Expected Results
Smaple Code 1: A color filled circle
Sample Code 2: The LED module will take turns display: a white point, full screen green, full screen yellow, a yellow rectangle, a yellow rectangle, a red X and a blue
circle,
.
FAQ
For any questions, advice or cool ideas to share, please visit the DFRobot Forum (http://www.dfrobot.com/forum/).
More
(http://www.dfrobot.com/) Shopping from 32x32 RGB LED Matrix Panel (4mm pitch) (https://www.dfrobot.com/product-1639.html) or DFRobot Distributor.
(http://www.dfrobot.com/index.php?route=information/distributorslogo)
This page was last modified on 11 October 2017, at 02:01.
Content is available under GNU Free Documentation License 1.3 or later (https://www.gnu.org/copyleft/fdl.html) unless otherwise noted.
(https://www.gnu.org/copyleft/fdl.html) (//www.mediawiki.org/)