#include #include byte led_pins[] = {2, 3, 4, 5, 6, 7, 8, 9}; int i, x, y, radius; const byte smileyface[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0 }; void setup() { Plex.init(led_pins); Plex.clear(); Plex.display(); } void loop() { Plex.scrollText("123456789", 1, true); // 1 time, blocking=true Plex.drawBitmap(smileyface); Plex.display(); delay(1000); // Explosions! for ( i = 0; i < 15; i++ ) { x = random(0, 8); y = random(0, 7); for ( radius = 0; radius < 12; radius++ ) { Plex.clear(); Plex.circle(x, y, radius); Plex.circle(x, y, radius + 1); Plex.display(); delay(30); } } // Draw a dot (x, y) Plex.clear(); Plex.pixel(1, 2); Plex.display(); delay(1000); // Draw a line (x0, y0, y1, y1) Plex.clear(); Plex.line(1, 2, 5, 5); Plex.display(); delay(1000); // Draw a rectangle (x, y, width, height) Plex.clear(); Plex.rect(1, 2, 5, 4); Plex.display(); delay(1000); // Draw a filled rectangle (x, y, width, height) Plex.clear(); Plex.rectFill(1, 2, 5, 4); Plex.display(); delay(1000); // Draw a circle (x, y, radius) Plex.clear(); Plex.circle(3, 3, 3); Plex.display(); delay(1000); // Draw a filled circle (x, y, radius) Plex.clear(); Plex.circleFill(3, 3, 3); Plex.display(); delay(1000); }