aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/testshapes_32x64/testshapes_32x64.ino54
1 files changed, 28 insertions, 26 deletions
diff --git a/examples/testshapes_32x64/testshapes_32x64.ino b/examples/testshapes_32x64/testshapes_32x64.ino
index 2a9998c..de911fc 100644
--- a/examples/testshapes_32x64/testshapes_32x64.ino
+++ b/examples/testshapes_32x64/testshapes_32x64.ino
@@ -10,7 +10,7 @@ void setup() {
Serial.begin(115200);
-
+
Serial.println("*****************************************************");
Serial.println(" HELLO !");
Serial.println("*****************************************************");
@@ -22,7 +22,7 @@ void setup() {
dma_display.drawFastHLine(0, y-1, dma_display.width(), dma_display.color565(255-(15*y), 0, 0));
delay(100);
}
-
+
delay(1000);
@@ -31,13 +31,13 @@ void setup() {
dma_display.drawFastHLine(0, y-1, dma_display.width(), dma_display.color565(128, 255-(15*y), 0));
delay(100);
}
-
- delay(2000);
-
-
+ delay(2000);
+
+
+
// draw a pixel in solid white
- dma_display.drawPixel(0, 0, dma_display.color444(15, 15, 15));
+ dma_display.drawPixel(0, 0, dma_display.color444(15, 15, 15));
delay(500);
// fix the screen with green
@@ -47,24 +47,24 @@ void setup() {
// draw a box in yellow
dma_display.drawRect(0, 0, dma_display.width(), dma_display.height(), dma_display.color444(15, 15, 0));
delay(500);
-
+
// draw an 'X' in red
dma_display.drawLine(0, 0, dma_display.width()-1, dma_display.height()-1, dma_display.color444(15, 0, 0));
dma_display.drawLine(dma_display.width()-1, 0, 0, dma_display.height()-1, dma_display.color444(15, 0, 0));
delay(500);
-
+
// draw a blue circle
dma_display.drawCircle(10, 10, 10, dma_display.color444(0, 0, 15));
delay(500);
-
+
// fill a violet circle
dma_display.fillCircle(40, 21, 10, dma_display.color444(15, 0, 15));
delay(500);
-
+
// fill the screen with 'black'
dma_display.fillScreen(dma_display.color444(0, 0, 0));
-
+
// draw some text!
dma_display.setTextSize(1); // size 1 == 8 pixels high
dma_display.setTextWrap(false); // Don't wrap at end of line - will do ourselves
@@ -76,8 +76,8 @@ void setup() {
dma_display.setTextColor(dma_display.color565(255, 0, 255));
dma_display.print(str[w]);
}
-
- dma_display.setCursor(2, 4); // next line
+
+ dma_display.println();
for (w=9; w<18; w++) {
dma_display.setTextColor(Wheel(w));
dma_display.print(str[w]);
@@ -87,28 +87,30 @@ void setup() {
//dma_display.println("Industries");
dma_display.setTextColor(dma_display.color444(15,15,15));
dma_display.println("LED MATRIX!");
-
+
// print each letter with a rainbow color
- dma_display.setTextColor(dma_display.color444(15,0,0));
+ dma_display.setTextColor(dma_display.color444(0,8,15));
dma_display.print('3');
- dma_display.setTextColor(dma_display.color444(15,4,0));
+ dma_display.setTextColor(dma_display.color444(15,4,0));
dma_display.print('2');
dma_display.setTextColor(dma_display.color444(15,15,0));
dma_display.print('x');
- dma_display.setTextColor(dma_display.color444(8,15,0));
+ dma_display.setTextColor(dma_display.color444(8,15,0));
dma_display.print('6');
- dma_display.setTextColor(dma_display.color444(0,15,0));
+ dma_display.setTextColor(dma_display.color444(8,0,15));
dma_display.print('4');
- dma_display.setCursor(34, 24);
- dma_display.setTextColor(dma_display.color444(0,15,15));
+
+ // Jump a half character
+ dma_display.setCursor(34, 24);
+ dma_display.setTextColor(dma_display.color444(0,15,15));
dma_display.print("*");
- dma_display.setTextColor(dma_display.color444(0,8,15));
+ dma_display.setTextColor(dma_display.color444(15,0,0));
dma_display.print('R');
- dma_display.setTextColor(dma_display.color444(0,0,15));
+ dma_display.setTextColor(dma_display.color444(0,15,0));
dma_display.print('G');
- dma_display.setTextColor(dma_display.color444(8,0,15));
+ dma_display.setTextColor(dma_display.color444(0,0,15));
dma_display.print("B");
- dma_display.setTextColor(dma_display.color444(15,0,8));
+ dma_display.setTextColor(dma_display.color444(15,0,8));
dma_display.println("*");
delay(2000);
@@ -127,7 +129,7 @@ void setup() {
delay(250);
}
*/
-
+
// whew!