It's December, time to spice up the Christmas lights!

The Dot Matrix Display (DMD) is a 32x16 array of high-brightness LEDs for visually striking effects. [Product Page]
Post Reply
KegRaider
Posts: 14
Joined: Sun Sep 09, 2012 12:08 am

It's December, time to spice up the Christmas lights!

Post by KegRaider » Wed Dec 07, 2016 3:13 am

Well, it's that time of year again, when I dust off the DMD's and stick them up inder the gable. I would like to thank "jedihermit" for his excel spreadhseet that made pixel art so much faster to achieve! If you haven't seen it, then take a look at his post here.viewtopic.php?f=26&t=6250

For those who use the Spark/Particle wifi Arduino boards, this DMD is pretty cool for installing it in a fairly remote place and updating it on your wifi.
It took me quite a few attempts to get this DMD and the 'Photon' talking with each other, but it's definitely worth the effort if you have them. I'll put my badly plagerized code below, so feel free to use it for yourself. It is a work in progress, since I just finished making it work. I have plans to animate the Mario "Christmas" star, once I work out what to do that is. Plus, I need to put an rtc.date call in to automagically work out how many sleeps it is until the 25th, so I can just set and forget.

Anyway, to get the hardware talking, you must wire your Spark Core/Particle Photon in the following manner: (as disected from the post over at particle.io https://community.particle.io/t/freetro ... les/4408/7

Code: Select all

Spark/Photon   |     DMD
 A5                   R   (MOSI)
 A3                   CLK  (SCK)
 A0                   nOE  (A0 supports PWM for brightness other than 255)
 D4                   A
 D3                   B
 D2                   SCK
 
So, once the hardware is coupled as above, and you have your Spark/Photon on your home wifi, talking to the cloud and waiting to receive code, you can go ahead and take my example below. This works, and you should have no problem understanding what goes where. Feel free to improve it how you see fit.

Code: Select all

// Includes section
#include "SparkIntervalTimer/SparkIntervalTimer.h"
#include "SparkTime/SparkTime.h"
#include "DMD/DMD.h"
#include "DMD/SystemFont5x7.h"
#include "DMD/Arial_black_16.h"

// Defines section
#define DISPLAYS_ACROSS 2  // How many panels horizonally
#define DISPLAYS_DOWN 1    // How many panels vertically

// Extra variables and declarations
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
IntervalTimer scanTimer;    // Timer functions needed for the Panel

void ScanDMD()
{
  dmd.scanDisplayBySPI();
}

// Starting 
void setup(void)
{

   //initialize TimerOne's interrupt/CPU usage used to scan and refresh the display
scanTimer.begin(ScanDMD, 5000, uSec);

   //clear/init the DMD pixels held in RAM, this is cleared now and in the first loop
   dmd.clearScreen( true );   //true is normal (all pixels off), false is negative (all pixels on)

}

/*--------------------------------------------------------------------------------------
  loop
  Arduino architecture main loop
--------------------------------------------------------------------------------------*/
void loop(void)
{
   byte b;

   // Clear the panel(s)
   dmd.clearScreen( true );

   // THE FIRST MESSAGE - SCROLLING
   //dmd.selectFont(System5x7);
   dmd.selectFont(Arial_Black_16);
   char msgOne[] = "Merry Christmas everyone!";
   int msgOneLength = 25;
   dmd.drawMarquee(msgOne,msgOneLength,(32*DISPLAYS_ACROSS)-1,0);
   long start=millis();
   long timer=start;
   boolean ret=false;
   while(!ret){
     if ((timer+30) < millis()) {
       ret=dmd.stepMarquee(-1,0);
       timer=millis();
     }
   }

   // THE SECOND MESSAGE - FLASHING
   //dmd.selectFont(System5x7);
   dmd.selectFont(Arial_Black_16);
   char msgTwo[] = "Ho";
   int msgTwoLength = 2;
   int noOfFlashes = 3;
   for (int i=0;i<noOfFlashes;i++)
   {
     // Display the message (flash it on)  (1,5 = top corner of text )
     dmd.drawString(  21,  1, msgTwo, msgTwoLength, GRAPHICS_NORMAL );
     delay(500);  // wait 0.5 seconds
     // Blank the message ( flash it off)
     dmd.drawString(  21,  1, msgTwo, msgTwoLength, GRAPHICS_NOR );
     delay(500);  // wait 0.5 seconds
   }
   dmd.clearScreen( true );

   // THE THIRD MESSAGE -  SCROLLING
   //dmd.selectFont(System5x7);
   dmd.selectFont(Arial_Black_16);
   char msgThree[] = "Santa, please stop here!";
   int msgThreeLength = 24;
   dmd.drawMarquee(msgThree,msgThreeLength,(32*DISPLAYS_ACROSS)-1,0);
   start=millis();
   timer=start;
   ret=false;
   while(!ret){
     if ((timer+30) < millis()) {
       ret=dmd.stepMarquee(-1,0);
       timer=millis();
     }
   }
   
      // THE FOURTH MESSAGE - MORE FLASHING, EVENTUALLY MAKE AN EXPANDING STAR
   //dmd.selectFont(System5x7);
   dmd.selectFont(Arial_Black_16);
   char msgFour[] = "Joy";
   int msgFourLength = 3;
   int noOfFlashes2 = 3;
   for (int i=0;i<noOfFlashes2;i++)
   {
     // Display the message (flash it on)  (1,5 = top corner of text )
     dmd.drawString(  21,  1, msgFour, msgFourLength, GRAPHICS_NORMAL );
     delay(500);  // wait 0.5 seconds
     // Blank the message ( flash it off)
     dmd.drawString(  21,  1, msgFour, msgFourLength, GRAPHICS_NOR );
     delay(500);  // wait 0.5 seconds
   }
   dmd.clearScreen( true );
   
   // THE FIFTH MESSAGE - COUNTDOWN TO D-DAY  ** Change to get rtc.date and subtract from the 25th December to get live updates. **
   dmd.selectFont(Arial_Black_16);
   char msgFive[] = "18 sleeps until Christmas";
   int msgFiveLength = 25;
   dmd.drawMarquee(msgFive,msgFiveLength,(32*DISPLAYS_ACROSS)-1,0);
   start=millis();
   timer=start;
   ret=false;
   while(!ret){
     if ((timer+30) < millis()) {
       ret=dmd.stepMarquee(-1,0);
       timer=millis();
     }
   }
   
   // THE SIXTH MESSAGE - DRAW A STAR

dmd.writePixel(1,5, GRAPHICS_NORMAL,1);
dmd.writePixel(1,6, GRAPHICS_NORMAL,1);
dmd.writePixel(1,14, GRAPHICS_NORMAL,1);
dmd.writePixel(1,15, GRAPHICS_NORMAL,1);
dmd.writePixel(2,5, GRAPHICS_NORMAL,1);
dmd.writePixel(2,7, GRAPHICS_NORMAL,1);
dmd.writePixel(2,12, GRAPHICS_NORMAL,1);
dmd.writePixel(2,13, GRAPHICS_NORMAL,1);
dmd.writePixel(2,15, GRAPHICS_NORMAL,1);
dmd.writePixel(3,5, GRAPHICS_NORMAL,1);
dmd.writePixel(3,8, GRAPHICS_NORMAL,1);
dmd.writePixel(3,10, GRAPHICS_NORMAL,1);
dmd.writePixel(3,11, GRAPHICS_NORMAL,1);
dmd.writePixel(3,15, GRAPHICS_NORMAL,1);
dmd.writePixel(4,5, GRAPHICS_NORMAL,1);
dmd.writePixel(4,9, GRAPHICS_NORMAL,1);
dmd.writePixel(4,15, GRAPHICS_NORMAL,1);
dmd.writePixel(5,5, GRAPHICS_NORMAL,1);
dmd.writePixel(5,14, GRAPHICS_NORMAL,1);
dmd.writePixel(6,3, GRAPHICS_NORMAL,1);
dmd.writePixel(6,4, GRAPHICS_NORMAL,1);
dmd.writePixel(6,9, GRAPHICS_NORMAL,1);
dmd.writePixel(6,13, GRAPHICS_NORMAL,1);
dmd.writePixel(7,1, GRAPHICS_NORMAL,1);
dmd.writePixel(7,2, GRAPHICS_NORMAL,1);
dmd.writePixel(7,6, GRAPHICS_NORMAL,1);
dmd.writePixel(7,7, GRAPHICS_NORMAL,1);
dmd.writePixel(7,10, GRAPHICS_NORMAL,1);
dmd.writePixel(7,13, GRAPHICS_NORMAL,1);
dmd.writePixel(8,0, GRAPHICS_NORMAL,1);
dmd.writePixel(8,10, GRAPHICS_NORMAL,1);
dmd.writePixel(8,12, GRAPHICS_NORMAL,1);
dmd.writePixel(9,1, GRAPHICS_NORMAL,1);
dmd.writePixel(9,2, GRAPHICS_NORMAL,1);
dmd.writePixel(9,6, GRAPHICS_NORMAL,1);
dmd.writePixel(9,7, GRAPHICS_NORMAL,1);
dmd.writePixel(9,10, GRAPHICS_NORMAL,1);
dmd.writePixel(9,13, GRAPHICS_NORMAL,1);
dmd.writePixel(10,3, GRAPHICS_NORMAL,1);
dmd.writePixel(10,4, GRAPHICS_NORMAL,1);
dmd.writePixel(10,9, GRAPHICS_NORMAL,1);
dmd.writePixel(10,13, GRAPHICS_NORMAL,1);
dmd.writePixel(11,5, GRAPHICS_NORMAL,1);
dmd.writePixel(11,14, GRAPHICS_NORMAL,1);
dmd.writePixel(12,5, GRAPHICS_NORMAL,1);
dmd.writePixel(12,9, GRAPHICS_NORMAL,1);
dmd.writePixel(12,15, GRAPHICS_NORMAL,1);
dmd.writePixel(13,5, GRAPHICS_NORMAL,1);
dmd.writePixel(13,8, GRAPHICS_NORMAL,1);
dmd.writePixel(13,10, GRAPHICS_NORMAL,1);
dmd.writePixel(13,11, GRAPHICS_NORMAL,1);
dmd.writePixel(13,15, GRAPHICS_NORMAL,1);
dmd.writePixel(14,5, GRAPHICS_NORMAL,1);
dmd.writePixel(14,7, GRAPHICS_NORMAL,1);
dmd.writePixel(14,12, GRAPHICS_NORMAL,1);
dmd.writePixel(14,13, GRAPHICS_NORMAL,1);
dmd.writePixel(14,15, GRAPHICS_NORMAL,1);
dmd.writePixel(15,5, GRAPHICS_NORMAL,1);
dmd.writePixel(15,6, GRAPHICS_NORMAL,1);
dmd.writePixel(15,14, GRAPHICS_NORMAL,1);
dmd.writePixel(15,15, GRAPHICS_NORMAL,1);

delay (1000);
dmd.clearScreen( true );


dmd.writePixel(17,5, GRAPHICS_NORMAL,1);
dmd.writePixel(17,6, GRAPHICS_NORMAL,1);
dmd.writePixel(17,14, GRAPHICS_NORMAL,1);
dmd.writePixel(17,15, GRAPHICS_NORMAL,1);
dmd.writePixel(18,5, GRAPHICS_NORMAL,1);
dmd.writePixel(18,7, GRAPHICS_NORMAL,1);
dmd.writePixel(18,12, GRAPHICS_NORMAL,1);
dmd.writePixel(18,13, GRAPHICS_NORMAL,1);
dmd.writePixel(18,15, GRAPHICS_NORMAL,1);
dmd.writePixel(19,5, GRAPHICS_NORMAL,1);
dmd.writePixel(19,8, GRAPHICS_NORMAL,1);
dmd.writePixel(19,10, GRAPHICS_NORMAL,1);
dmd.writePixel(19,11, GRAPHICS_NORMAL,1);
dmd.writePixel(19,15, GRAPHICS_NORMAL,1);
dmd.writePixel(20,5, GRAPHICS_NORMAL,1);
dmd.writePixel(20,9, GRAPHICS_NORMAL,1);
dmd.writePixel(20,15, GRAPHICS_NORMAL,1);
dmd.writePixel(21,5, GRAPHICS_NORMAL,1);
dmd.writePixel(21,14, GRAPHICS_NORMAL,1);
dmd.writePixel(22,3, GRAPHICS_NORMAL,1);
dmd.writePixel(22,4, GRAPHICS_NORMAL,1);
dmd.writePixel(22,9, GRAPHICS_NORMAL,1);
dmd.writePixel(22,13, GRAPHICS_NORMAL,1);
dmd.writePixel(23,1, GRAPHICS_NORMAL,1);
dmd.writePixel(23,2, GRAPHICS_NORMAL,1);
dmd.writePixel(23,6, GRAPHICS_NORMAL,1);
dmd.writePixel(23,7, GRAPHICS_NORMAL,1);
dmd.writePixel(23,10, GRAPHICS_NORMAL,1);
dmd.writePixel(23,13, GRAPHICS_NORMAL,1);
dmd.writePixel(24,0, GRAPHICS_NORMAL,1);
dmd.writePixel(24,10, GRAPHICS_NORMAL,1);
dmd.writePixel(24,12, GRAPHICS_NORMAL,1);
dmd.writePixel(25,1, GRAPHICS_NORMAL,1);
dmd.writePixel(25,2, GRAPHICS_NORMAL,1);
dmd.writePixel(25,6, GRAPHICS_NORMAL,1);
dmd.writePixel(25,7, GRAPHICS_NORMAL,1);
dmd.writePixel(25,10, GRAPHICS_NORMAL,1);
dmd.writePixel(25,13, GRAPHICS_NORMAL,1);
dmd.writePixel(26,3, GRAPHICS_NORMAL,1);
dmd.writePixel(26,4, GRAPHICS_NORMAL,1);
dmd.writePixel(26,9, GRAPHICS_NORMAL,1);
dmd.writePixel(26,13, GRAPHICS_NORMAL,1);
dmd.writePixel(27,5, GRAPHICS_NORMAL,1);
dmd.writePixel(27,14, GRAPHICS_NORMAL,1);
dmd.writePixel(28,5, GRAPHICS_NORMAL,1);
dmd.writePixel(28,9, GRAPHICS_NORMAL,1);
dmd.writePixel(28,15, GRAPHICS_NORMAL,1);
dmd.writePixel(29,5, GRAPHICS_NORMAL,1);
dmd.writePixel(29,8, GRAPHICS_NORMAL,1);
dmd.writePixel(29,10, GRAPHICS_NORMAL,1);
dmd.writePixel(29,11, GRAPHICS_NORMAL,1);
dmd.writePixel(29,15, GRAPHICS_NORMAL,1);
dmd.writePixel(30,5, GRAPHICS_NORMAL,1);
dmd.writePixel(30,7, GRAPHICS_NORMAL,1);
dmd.writePixel(30,12, GRAPHICS_NORMAL,1);
dmd.writePixel(30,13, GRAPHICS_NORMAL,1);
dmd.writePixel(30,15, GRAPHICS_NORMAL,1);
dmd.writePixel(31,5, GRAPHICS_NORMAL,1);
dmd.writePixel(31,6, GRAPHICS_NORMAL,1);
dmd.writePixel(31,14, GRAPHICS_NORMAL,1);
dmd.writePixel(31,15, GRAPHICS_NORMAL,1);



   // Display the star for 2 seconds before we start again
   delay(2000);
   
}

mohitsachan33
Posts: 4
Joined: Fri Oct 14, 2016 9:26 am

Re: It's December, time to spice up the Christmas lights!

Post by mohitsachan33 » Wed Dec 07, 2016 12:43 pm

Sir
Now i'm able to control the p10 led board with the help of nodemcu but there's a problem when i'm going to scroll the string then onle for 10 sec it scroll after thar error occur then after it start to scroll for 10 sec.plz help me
It's showing like this------------

Sôÿabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzab
Exception (0):
epc1=0x40202b84 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: sys
sp: 3ffffc50 end: 3fffffb0 offset: 01a0

>>>stack>>>
3ffffdf0: 42d80000 43610000 00000000 00000022
3ffffe00: 40222b46 3ffefedc 3fffc248 4000050c
3ffffe10: 4000437d 00000030 00000016 ffffffff
3ffffe20: 60000200 00000008 00000000 80000000
3ffffe30: 20000000 3fff0718 80000000 203fc060
3ffffe40: 00000000 3fffc6fc 3ffe8dfc 3fff071c
3ffffe50: 00000294 003fc060 60000600 00000030
3ffffe60: 3fffc200 3ffee39c 3ffee370 402025ad
3ffffe70: 3fff0410 3fff0420 3fff0430 3fff0440
3ffffe80: 40101180 0050f1b2 00000000 40202ba5
3ffffe90: 00000000 00000000 0000001f 4010103d
3ffffea0: 4000050c 0034557a 3fffc248 4000050c
3ffffeb0: 40000f68 00000030 0000001a ffffffff
3ffffec0: 40000f58 00000000 00000020 00000000
3ffffed0: 3ffefe6c 4021bf70 00000000 00000000
3ffffee0: ffffffff 3ffe9284 3ffe8dfc 3fffdab0
3ffffef0: 00000000 3fffdcb0 3ffe89b8 00000030
3fffff00: 00000000 400042db 00000064 60000600
3fffff10: 40004b31 3fff06bc 000002f4 003fc000
3fffff20: 40101f6e 3ffe8990 3ffe9130 4010710c
3fffff30: 4021ba3d 3ffe9130 3ffe8990 00a989d6
3fffff40: 3fff06bc 00001000 4021bed6 00000008
3fffff50: 40102360 00000000 4021bf83 3ffe91e4
3fffff60: 3ffe8990 0034c9c4 3ffe8990 60000600
3fffff70: 402044f5 3ffe91e4 3ffe8990 00a94cfd
3fffff80: 4020453a 3fffdab0 00000000 3fffdcb0
3fffff90: 3ffe89a0 3fffdad0 3ffee53c 402034e7
3fffffa0: 40000f49 00018106 3fffdab0 40000f49
<<<stack<<<
¨º‰¡rþ‹?abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghi
Exception (0):
epc1=0x40202b84 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: sys
sp: 3ffffc50 end: 3fffffb0 offset: 01a0

>>>stack>>>
3ffffdf0: 00000004 3ffee394 3ffffe20 40202458
3ffffe00: 40222b46 3ffefedc 3fffc248 4000050c
3ffffe10: 4000437d 00000030 00000016 ffffffff
3ffffe20: 60000200 00000008 ffffffff 80000000
3ffffe30: 20000000 3fff07b8 80000000 203fc100
3ffffe40: 80000000 3fffc6fc 3ffe8dfc 3fff07bc
3ffffe50: 000001f4 003fc100 60000600 00000030
3ffffe60: 3fffc200 3ffee39c 3ffee370 402025ad
3ffffe70: 3fff0414 3fff0424 3fff0434 3fff0444
3ffffe80: 40101180 0057d935 00000000 40202ba5
3ffffe90: 00000000 00000000 0000001f 4010103d
3ffffea0: 4000050c 003b3cfd 3fffc248 4000050c
3ffffeb0: 40000f68 00000030 0000001c ffffffff
3ffffec0: 40000f58 00000000 00000020 00000000
3ffffed0: 00000013 4021bf70 3ffe8dfc 00000001
3ffffee0: ffffffff 3ffe9284 3ffe8dfc 3fffdab0
3ffffef0: 00000000 3fffdcb0 3ffe89a0 00000030
3fffff00: 00000000 400042db 00000064 60000600
3fffff10: 40004b31 3fff06bc 000002f4 003fc000
3fffff20: 40101f6e 3ffe8990 3ffe9130 4010710c
3fffff30: 4021ba3d 3ffe9130 3ffe8990 00bfbeb1
3fffff40: 3fff06bc 00001000 4021bed6 00000008
3fffff50: 4021de50 3ffe9284 4021bf83 3ffe91e4
3fffff60: 3ffe8990 003bb13f 3ffe8990 60000600
3fffff70: 402044f5 3ffe91e4 3ffe8990 00bf919a
3fffff80: 4020453a 3fffdab0 00000000 3fffdcb0
3fffff90: 3ffe89a8 3fffdad0 3ffee53c 402034e7
3fffffa0: 40000f49 000181c6 3fffdab0 40000f49
<<<stack<<<
UÞÀê”âabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmn




Screenshot.png

KegRaider
Posts: 14
Joined: Sun Sep 09, 2012 12:08 am

Re: It's December, time to spice up the Christmas lights!

Post by KegRaider » Wed Dec 07, 2016 11:00 pm

Hi mohitsachan33,

Without actually looking at any code, it's very difficult to even begin debugging. Are you able to do a simple draw pixel, or clear dmd false command to ensure that it's talking correctly?

mohitsachan33
Posts: 4
Joined: Fri Oct 14, 2016 9:26 am

Re: It's December, time to spice up the Christmas lights!

Post by mohitsachan33 » Thu Dec 08, 2016 5:04 am

yeah i'm able to do this only error comes when i go for scrolling.

KegRaider
Posts: 14
Joined: Sun Sep 09, 2012 12:08 am

Re: It's December, time to spice up the Christmas lights!

Post by KegRaider » Sat Dec 10, 2016 11:21 am

I would have to assume that if is dumping that out in a serial monitor, that perhaps your controller is faulty, of a library thats being used is a bit wonky. I am no coding genius, but you should start eliminating things first. I don't have any experience with the nodemcu boards sorry.

Maye hit this guy up http://www.esp8266.com/viewtopic.php?f=33&t=3916

KegRaider
Posts: 14
Joined: Sun Sep 09, 2012 12:08 am

Re: It's December, time to spice up the Christmas lights!

Post by KegRaider » Sat Dec 10, 2016 8:51 pm

Ok, all done with the code for this year. I'll work on trying animation before Christmas next year. I have plans in my head i tells ya!
Anyway, the photon now automagically works out how many sleeps are left before Christmas, this is worked out starting at line 405.

I'm posting all my code in here for everyone to share in the Christmas excitement. As I have said before, feel free to butcher it to suit your needs, it should not be that difficult to modify to suit the standard Eleven Arduino. I have pieced most of this code from various forums myself, so "fair's fair". If you only have one DMD, then you will need to subtract 32 from the sections with:

Code: Select all

//  Panel 2 (right side 32-63 pixels)  - Three Christmas Trees
dmd.writePixel(32,14, GRAPHICS_NORMAL,1);
dmd.writePixel(33,11, GRAPHICS_NORMAL,1);
So it should read:

Code: Select all

//  Panel 2 (right side 32-63 pixels)  - Three Christmas Trees
dmd.writePixel(0,14, GRAPHICS_NORMAL,1);
dmd.writePixel(1,11, GRAPHICS_NORMAL,1);
etc, etc. And probably add a delay after the first panel draw, or it will be over written too fast to notice.

Coupling your Eleven with the http://www.freetronics.com.au/products/ ... ExoCuJ95hE RTC module and changing the time based code, it should work the same. In fact, I did have this running on my Eleven (no RTC), but because I knew I was going to be away this week, I decided to put in the Photon, so I could easily program it from half way across the country.

Code: Select all

// Includes section
#include "SparkIntervalTimer/SparkIntervalTimer.h"
#include "SparkTime/SparkTime.h"
#include "DMD/DMD.h"
#include "DMD/SystemFont5x7.h"
#include "DMD/Arial_black_16.h"

// Defines section
#define DISPLAYS_ACROSS 2  // How many panels horizonally
#define DISPLAYS_DOWN 1    // How many panels vertically

// Extra variables and declarations
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
IntervalTimer scanTimer;    // Timer functions needed for the Panel

UDP UDPClient;
String remainingDays = "";

float localtimezone = 10.0; 
long int tlast = 0;  
int xmasday = 25;  

/*--------------------------------------------------------------------------------------
  Interrupt handler for Timer1 (TimerOne) driven DMD refresh scanning, this gets
  called at the period set in Timer1.initialize();
--------------------------------------------------------------------------------------*/
void ScanDMD()
{
  dmd.scanDisplayBySPI();
}

/*--------------------------------------------------------------------------------------
  setup
  Called by the Arduino architecture before the main loop begins
--------------------------------------------------------------------------------------*/
void setup()
{

   //initialize TimerOne's interrupt/CPU usage used to scan and refresh the display
    scanTimer.begin(ScanDMD, 5000, uSec);
        dmd.clearScreen( true );   //true is normal (all pixels off), false is negative (all pixels on)
        
    Particle.syncTime();
    Time.zone(localtimezone);
    Serial.begin(9600);
}


void loop()
{
   
   byte b;

   dmd.clearScreen( true );

   // THE FIRST MESSAGE - SCROLLING
   dmd.selectFont(Arial_Black_16);
   char msgOne[] = "Merry Christmas everyone!";
   int msgOneLength = 25;
   dmd.drawMarquee(msgOne,msgOneLength,(32*DISPLAYS_ACROSS)-1,0);
   long start=millis();
   long timer=start;
   boolean ret=false;
   while(!ret){
     if ((timer+30) < millis()) {
       ret=dmd.stepMarquee(-1,0);
       timer=millis();
     }
   }

   // THE SECOND MESSAGE - FLASHING
   dmd.selectFont(Arial_Black_16);
   char msgTwo[] = "Ho";
   int msgTwoLength = 2;
   int noOfFlashes = 3;
   for (int i=0;i<noOfFlashes;i++)
   {
     dmd.drawString(  21,  1, msgTwo, msgTwoLength, GRAPHICS_NORMAL );
     delay(250);  // wait 0.5 seconds
     
     dmd.drawString(  21,  1, msgTwo, msgTwoLength, GRAPHICS_NOR );
     delay(250);  // wait 0.5 seconds
   }
   
   dmd.clearScreen( true );

   // THE THIRD MESSAGE -  SCROLLING
    dmd.selectFont(Arial_Black_16);
   char msgThree[] = "Santa, please stop here!";
   int msgThreeLength = 24;
   dmd.drawMarquee(msgThree,msgThreeLength,(32*DISPLAYS_ACROSS)-1,0);
   start=millis();
   timer=start;
   ret=false;
   while(!ret){
     if ((timer+30) < millis()) {
       ret=dmd.stepMarquee(-1,0);
       timer=millis();
     }
   }
    dmd.clearScreen( true ); 
   
      // THE FOURTH MESSAGE
//  A Sceneic pixel display, courtesy of jedihermit@Freetronics Forums
//  Panel 1  (left side 0-31 pixels) - Two Reindeer
dmd.writePixel(0,9, GRAPHICS_NORMAL,1);
dmd.writePixel(1,8, GRAPHICS_NORMAL,1);
dmd.writePixel(1,12, GRAPHICS_NORMAL,1);
dmd.writePixel(1,13, GRAPHICS_NORMAL,1);
dmd.writePixel(1,14, GRAPHICS_NORMAL,1);
dmd.writePixel(1,15, GRAPHICS_NORMAL,1);
dmd.writePixel(2,8, GRAPHICS_NORMAL,1);
dmd.writePixel(2,9, GRAPHICS_NORMAL,1);
dmd.writePixel(2,10, GRAPHICS_NORMAL,1);
dmd.writePixel(2,11, GRAPHICS_NORMAL,1);
dmd.writePixel(2,12, GRAPHICS_NORMAL,1);
dmd.writePixel(3,8, GRAPHICS_NORMAL,1);
dmd.writePixel(3,9, GRAPHICS_NORMAL,1);
dmd.writePixel(3,10, GRAPHICS_NORMAL,1);
dmd.writePixel(3,11, GRAPHICS_NORMAL,1);
dmd.writePixel(3,12, GRAPHICS_NORMAL,1);
dmd.writePixel(3,13, GRAPHICS_NORMAL,1);
dmd.writePixel(3,14, GRAPHICS_NORMAL,1);
dmd.writePixel(4,8, GRAPHICS_NORMAL,1);
dmd.writePixel(4,9, GRAPHICS_NORMAL,1);
dmd.writePixel(4,10, GRAPHICS_NORMAL,1);
dmd.writePixel(4,11, GRAPHICS_NORMAL,1);
dmd.writePixel(4,14, GRAPHICS_NORMAL,1);
dmd.writePixel(4,15, GRAPHICS_NORMAL,1);
dmd.writePixel(5,8, GRAPHICS_NORMAL,1);
dmd.writePixel(5,9, GRAPHICS_NORMAL,1);
dmd.writePixel(5,10, GRAPHICS_NORMAL,1);
dmd.writePixel(5,11, GRAPHICS_NORMAL,1);
dmd.writePixel(6,1, GRAPHICS_NORMAL,1);
dmd.writePixel(6,2, GRAPHICS_NORMAL,1);
dmd.writePixel(6,3, GRAPHICS_NORMAL,1);
dmd.writePixel(6,8, GRAPHICS_NORMAL,1);
dmd.writePixel(6,9, GRAPHICS_NORMAL,1);
dmd.writePixel(6,10, GRAPHICS_NORMAL,1);
dmd.writePixel(6,11, GRAPHICS_NORMAL,1);
dmd.writePixel(7,1, GRAPHICS_NORMAL,1);
dmd.writePixel(7,3, GRAPHICS_NORMAL,1);
dmd.writePixel(7,8, GRAPHICS_NORMAL,1);
dmd.writePixel(7,9, GRAPHICS_NORMAL,1);
dmd.writePixel(7,10, GRAPHICS_NORMAL,1);
dmd.writePixel(7,11, GRAPHICS_NORMAL,1);
dmd.writePixel(7,12, GRAPHICS_NORMAL,1);
dmd.writePixel(7,13, GRAPHICS_NORMAL,1);
dmd.writePixel(7,14, GRAPHICS_NORMAL,1);
dmd.writePixel(7,15, GRAPHICS_NORMAL,1);
dmd.writePixel(8,3, GRAPHICS_NORMAL,1);
dmd.writePixel(8,8, GRAPHICS_NORMAL,1);
dmd.writePixel(8,9, GRAPHICS_NORMAL,1);
dmd.writePixel(8,10, GRAPHICS_NORMAL,1);
dmd.writePixel(8,11, GRAPHICS_NORMAL,1);
dmd.writePixel(8,12, GRAPHICS_NORMAL,1);
dmd.writePixel(9,1, GRAPHICS_NORMAL,1);
dmd.writePixel(9,2, GRAPHICS_NORMAL,1);
dmd.writePixel(9,3, GRAPHICS_NORMAL,1);
dmd.writePixel(9,4, GRAPHICS_NORMAL,1);
dmd.writePixel(9,8, GRAPHICS_NORMAL,1);
dmd.writePixel(9,9, GRAPHICS_NORMAL,1);
dmd.writePixel(9,10, GRAPHICS_NORMAL,1);
dmd.writePixel(9,11, GRAPHICS_NORMAL,1);
dmd.writePixel(9,12, GRAPHICS_NORMAL,1);
dmd.writePixel(9,13, GRAPHICS_NORMAL,1);
dmd.writePixel(9,14, GRAPHICS_NORMAL,1);
dmd.writePixel(9,15, GRAPHICS_NORMAL,1);
dmd.writePixel(10,1, GRAPHICS_NORMAL,1);
dmd.writePixel(10,3, GRAPHICS_NORMAL,1);
dmd.writePixel(10,4, GRAPHICS_NORMAL,1);
dmd.writePixel(10,5, GRAPHICS_NORMAL,1);
dmd.writePixel(10,6, GRAPHICS_NORMAL,1);
dmd.writePixel(10,7, GRAPHICS_NORMAL,1);
dmd.writePixel(10,8, GRAPHICS_NORMAL,1);
dmd.writePixel(10,9, GRAPHICS_NORMAL,1);
dmd.writePixel(10,10, GRAPHICS_NORMAL,1);
dmd.writePixel(11,4, GRAPHICS_NORMAL,1);
dmd.writePixel(11,5, GRAPHICS_NORMAL,1);
dmd.writePixel(11,6, GRAPHICS_NORMAL,1);
dmd.writePixel(12,5, GRAPHICS_NORMAL,1);
dmd.writePixel(12,6, GRAPHICS_NORMAL,1);
dmd.writePixel(13,5, GRAPHICS_NORMAL,1);
dmd.writePixel(13,6, GRAPHICS_NORMAL,1);
dmd.writePixel(14,15, GRAPHICS_NORMAL,1);
dmd.writePixel(15,8, GRAPHICS_NORMAL,1);
dmd.writePixel(15,12, GRAPHICS_NORMAL,1);
dmd.writePixel(15,13, GRAPHICS_NORMAL,1);
dmd.writePixel(15,14, GRAPHICS_NORMAL,1);
dmd.writePixel(16,8, GRAPHICS_NORMAL,1);
dmd.writePixel(16,9, GRAPHICS_NORMAL,1);
dmd.writePixel(16,10, GRAPHICS_NORMAL,1);
dmd.writePixel(16,11, GRAPHICS_NORMAL,1);
dmd.writePixel(16,12, GRAPHICS_NORMAL,1);
dmd.writePixel(17,8, GRAPHICS_NORMAL,1);
dmd.writePixel(17,9, GRAPHICS_NORMAL,1);
dmd.writePixel(17,10, GRAPHICS_NORMAL,1);
dmd.writePixel(17,11, GRAPHICS_NORMAL,1);
dmd.writePixel(17,12, GRAPHICS_NORMAL,1);
dmd.writePixel(17,13, GRAPHICS_NORMAL,1);
dmd.writePixel(17,14, GRAPHICS_NORMAL,1);
dmd.writePixel(17,15, GRAPHICS_NORMAL,1);
dmd.writePixel(18,8, GRAPHICS_NORMAL,1);
dmd.writePixel(18,9, GRAPHICS_NORMAL,1);
dmd.writePixel(18,10, GRAPHICS_NORMAL,1);
dmd.writePixel(18,11, GRAPHICS_NORMAL,1);
dmd.writePixel(19,8, GRAPHICS_NORMAL,1);
dmd.writePixel(19,9, GRAPHICS_NORMAL,1);
dmd.writePixel(19,10, GRAPHICS_NORMAL,1);
dmd.writePixel(19,11, GRAPHICS_NORMAL,1);
dmd.writePixel(20,8, GRAPHICS_NORMAL,1);
dmd.writePixel(20,9, GRAPHICS_NORMAL,1);
dmd.writePixel(20,10, GRAPHICS_NORMAL,1);
dmd.writePixel(20,11, GRAPHICS_NORMAL,1);
dmd.writePixel(20,15, GRAPHICS_NORMAL,1);
dmd.writePixel(21,8, GRAPHICS_NORMAL,1);
dmd.writePixel(21,9, GRAPHICS_NORMAL,1);
dmd.writePixel(21,10, GRAPHICS_NORMAL,1);
dmd.writePixel(21,11, GRAPHICS_NORMAL,1);
dmd.writePixel(21,12, GRAPHICS_NORMAL,1);
dmd.writePixel(21,13, GRAPHICS_NORMAL,1);
dmd.writePixel(21,14, GRAPHICS_NORMAL,1);
dmd.writePixel(22,1, GRAPHICS_NORMAL,1);
dmd.writePixel(22,2, GRAPHICS_NORMAL,1);
dmd.writePixel(22,8, GRAPHICS_NORMAL,1);
dmd.writePixel(22,9, GRAPHICS_NORMAL,1);
dmd.writePixel(22,10, GRAPHICS_NORMAL,1);
dmd.writePixel(22,11, GRAPHICS_NORMAL,1);
dmd.writePixel(23,0, GRAPHICS_NORMAL,1);
dmd.writePixel(23,3, GRAPHICS_NORMAL,1);
dmd.writePixel(23,4, GRAPHICS_NORMAL,1);
dmd.writePixel(23,8, GRAPHICS_NORMAL,1);
dmd.writePixel(23,9, GRAPHICS_NORMAL,1);
dmd.writePixel(23,10, GRAPHICS_NORMAL,1);
dmd.writePixel(23,11, GRAPHICS_NORMAL,1);
dmd.writePixel(23,12, GRAPHICS_NORMAL,1);
dmd.writePixel(23,13, GRAPHICS_NORMAL,1);
dmd.writePixel(23,14, GRAPHICS_NORMAL,1);
dmd.writePixel(23,15, GRAPHICS_NORMAL,1);
dmd.writePixel(24,2, GRAPHICS_NORMAL,1);
dmd.writePixel(24,3, GRAPHICS_NORMAL,1);
dmd.writePixel(24,4, GRAPHICS_NORMAL,1);
dmd.writePixel(24,5, GRAPHICS_NORMAL,1);
dmd.writePixel(24,6, GRAPHICS_NORMAL,1);
dmd.writePixel(24,7, GRAPHICS_NORMAL,1);
dmd.writePixel(24,8, GRAPHICS_NORMAL,1);
dmd.writePixel(24,9, GRAPHICS_NORMAL,1);
dmd.writePixel(24,10, GRAPHICS_NORMAL,1);
dmd.writePixel(25,1, GRAPHICS_NORMAL,1);
dmd.writePixel(25,4, GRAPHICS_NORMAL,1);
dmd.writePixel(25,5, GRAPHICS_NORMAL,1);
dmd.writePixel(25,6, GRAPHICS_NORMAL,1);
dmd.writePixel(26,2, GRAPHICS_NORMAL,1);
dmd.writePixel(26,5, GRAPHICS_NORMAL,1);
dmd.writePixel(26,6, GRAPHICS_NORMAL,1);
dmd.writePixel(26,7, GRAPHICS_NORMAL,1);
dmd.writePixel(27,6, GRAPHICS_NORMAL,1);
dmd.writePixel(27,7, GRAPHICS_NORMAL,1);


//  Panel 2 (right side 32-63 pixels)  - Three Christmas Trees
dmd.writePixel(32,14, GRAPHICS_NORMAL,1);
dmd.writePixel(33,11, GRAPHICS_NORMAL,1);
dmd.writePixel(33,13, GRAPHICS_NORMAL,1);
dmd.writePixel(33,14, GRAPHICS_NORMAL,1);
dmd.writePixel(34,8, GRAPHICS_NORMAL,1);
dmd.writePixel(34,10, GRAPHICS_NORMAL,1);
dmd.writePixel(34,11, GRAPHICS_NORMAL,1);
dmd.writePixel(34,12, GRAPHICS_NORMAL,1);
dmd.writePixel(34,13, GRAPHICS_NORMAL,1);
dmd.writePixel(34,14, GRAPHICS_NORMAL,1);
dmd.writePixel(35,7, GRAPHICS_NORMAL,1);
dmd.writePixel(35,8, GRAPHICS_NORMAL,1);
dmd.writePixel(35,9, GRAPHICS_NORMAL,1);
dmd.writePixel(35,10, GRAPHICS_NORMAL,1);
dmd.writePixel(35,11, GRAPHICS_NORMAL,1);
dmd.writePixel(35,12, GRAPHICS_NORMAL,1);
dmd.writePixel(35,13, GRAPHICS_NORMAL,1);
dmd.writePixel(35,14, GRAPHICS_NORMAL,1);
dmd.writePixel(36,6, GRAPHICS_NORMAL,1);
dmd.writePixel(36,7, GRAPHICS_NORMAL,1);
dmd.writePixel(36,8, GRAPHICS_NORMAL,1);
dmd.writePixel(36,9, GRAPHICS_NORMAL,1);
dmd.writePixel(36,10, GRAPHICS_NORMAL,1);
dmd.writePixel(36,11, GRAPHICS_NORMAL,1);
dmd.writePixel(36,12, GRAPHICS_NORMAL,1);
dmd.writePixel(36,13, GRAPHICS_NORMAL,1);
dmd.writePixel(36,14, GRAPHICS_NORMAL,1);
dmd.writePixel(36,15, GRAPHICS_NORMAL,1);
dmd.writePixel(37,7, GRAPHICS_NORMAL,1);
dmd.writePixel(37,8, GRAPHICS_NORMAL,1);
dmd.writePixel(37,9, GRAPHICS_NORMAL,1);
dmd.writePixel(37,10, GRAPHICS_NORMAL,1);
dmd.writePixel(37,11, GRAPHICS_NORMAL,1);
dmd.writePixel(37,12, GRAPHICS_NORMAL,1);
dmd.writePixel(37,13, GRAPHICS_NORMAL,1);
dmd.writePixel(37,14, GRAPHICS_NORMAL,1);
dmd.writePixel(38,8, GRAPHICS_NORMAL,1);
dmd.writePixel(38,10, GRAPHICS_NORMAL,1);
dmd.writePixel(38,11, GRAPHICS_NORMAL,1);
dmd.writePixel(38,12, GRAPHICS_NORMAL,1);
dmd.writePixel(38,13, GRAPHICS_NORMAL,1);
dmd.writePixel(38,14, GRAPHICS_NORMAL,1);
dmd.writePixel(39,11, GRAPHICS_NORMAL,1);
dmd.writePixel(39,13, GRAPHICS_NORMAL,1);
dmd.writePixel(39,14, GRAPHICS_NORMAL,1);
dmd.writePixel(40,14, GRAPHICS_NORMAL,1);
dmd.writePixel(43,13, GRAPHICS_NORMAL,1);
dmd.writePixel(44,10, GRAPHICS_NORMAL,1);
dmd.writePixel(44,12, GRAPHICS_NORMAL,1);
dmd.writePixel(44,13, GRAPHICS_NORMAL,1);
dmd.writePixel(45,7, GRAPHICS_NORMAL,1);
dmd.writePixel(45,9, GRAPHICS_NORMAL,1);
dmd.writePixel(45,10, GRAPHICS_NORMAL,1);
dmd.writePixel(45,11, GRAPHICS_NORMAL,1);
dmd.writePixel(45,12, GRAPHICS_NORMAL,1);
dmd.writePixel(45,13, GRAPHICS_NORMAL,1);
dmd.writePixel(46,6, GRAPHICS_NORMAL,1);
dmd.writePixel(46,7, GRAPHICS_NORMAL,1);
dmd.writePixel(46,8, GRAPHICS_NORMAL,1);
dmd.writePixel(46,9, GRAPHICS_NORMAL,1);
dmd.writePixel(46,10, GRAPHICS_NORMAL,1);
dmd.writePixel(46,11, GRAPHICS_NORMAL,1);
dmd.writePixel(46,12, GRAPHICS_NORMAL,1);
dmd.writePixel(46,13, GRAPHICS_NORMAL,1);
dmd.writePixel(47,5, GRAPHICS_NORMAL,1);
dmd.writePixel(47,6, GRAPHICS_NORMAL,1);
dmd.writePixel(47,7, GRAPHICS_NORMAL,1);
dmd.writePixel(47,8, GRAPHICS_NORMAL,1);
dmd.writePixel(47,9, GRAPHICS_NORMAL,1);
dmd.writePixel(47,10, GRAPHICS_NORMAL,1);
dmd.writePixel(47,11, GRAPHICS_NORMAL,1);
dmd.writePixel(47,12, GRAPHICS_NORMAL,1);
dmd.writePixel(47,13, GRAPHICS_NORMAL,1);
dmd.writePixel(47,14, GRAPHICS_NORMAL,1);
dmd.writePixel(48,6, GRAPHICS_NORMAL,1);
dmd.writePixel(48,7, GRAPHICS_NORMAL,1);
dmd.writePixel(48,8, GRAPHICS_NORMAL,1);
dmd.writePixel(48,9, GRAPHICS_NORMAL,1);
dmd.writePixel(48,10, GRAPHICS_NORMAL,1);
dmd.writePixel(48,11, GRAPHICS_NORMAL,1);
dmd.writePixel(48,12, GRAPHICS_NORMAL,1);
dmd.writePixel(48,13, GRAPHICS_NORMAL,1);
dmd.writePixel(49,7, GRAPHICS_NORMAL,1);
dmd.writePixel(49,9, GRAPHICS_NORMAL,1);
dmd.writePixel(49,10, GRAPHICS_NORMAL,1);
dmd.writePixel(49,11, GRAPHICS_NORMAL,1);
dmd.writePixel(49,12, GRAPHICS_NORMAL,1);
dmd.writePixel(49,13, GRAPHICS_NORMAL,1);
dmd.writePixel(50,10, GRAPHICS_NORMAL,1);
dmd.writePixel(50,12, GRAPHICS_NORMAL,1);
dmd.writePixel(50,13, GRAPHICS_NORMAL,1);
dmd.writePixel(51,13, GRAPHICS_NORMAL,1);
dmd.writePixel(54,12, GRAPHICS_NORMAL,1);
dmd.writePixel(55,9, GRAPHICS_NORMAL,1);
dmd.writePixel(55,11, GRAPHICS_NORMAL,1);
dmd.writePixel(55,12, GRAPHICS_NORMAL,1);
dmd.writePixel(56,6, GRAPHICS_NORMAL,1);
dmd.writePixel(56,8, GRAPHICS_NORMAL,1);
dmd.writePixel(56,9, GRAPHICS_NORMAL,1);
dmd.writePixel(56,10, GRAPHICS_NORMAL,1);
dmd.writePixel(56,11, GRAPHICS_NORMAL,1);
dmd.writePixel(56,12, GRAPHICS_NORMAL,1);
dmd.writePixel(57,5, GRAPHICS_NORMAL,1);
dmd.writePixel(57,6, GRAPHICS_NORMAL,1);
dmd.writePixel(57,7, GRAPHICS_NORMAL,1);
dmd.writePixel(57,8, GRAPHICS_NORMAL,1);
dmd.writePixel(57,9, GRAPHICS_NORMAL,1);
dmd.writePixel(57,10, GRAPHICS_NORMAL,1);
dmd.writePixel(57,11, GRAPHICS_NORMAL,1);
dmd.writePixel(57,12, GRAPHICS_NORMAL,1);
dmd.writePixel(58,4, GRAPHICS_NORMAL,1);
dmd.writePixel(58,5, GRAPHICS_NORMAL,1);
dmd.writePixel(58,6, GRAPHICS_NORMAL,1);
dmd.writePixel(58,7, GRAPHICS_NORMAL,1);
dmd.writePixel(58,8, GRAPHICS_NORMAL,1);
dmd.writePixel(58,9, GRAPHICS_NORMAL,1);
dmd.writePixel(58,10, GRAPHICS_NORMAL,1);
dmd.writePixel(58,11, GRAPHICS_NORMAL,1);
dmd.writePixel(58,12, GRAPHICS_NORMAL,1);
dmd.writePixel(58,13, GRAPHICS_NORMAL,1);
dmd.writePixel(59,5, GRAPHICS_NORMAL,1);
dmd.writePixel(59,6, GRAPHICS_NORMAL,1);
dmd.writePixel(59,7, GRAPHICS_NORMAL,1);
dmd.writePixel(59,8, GRAPHICS_NORMAL,1);
dmd.writePixel(59,9, GRAPHICS_NORMAL,1);
dmd.writePixel(59,10, GRAPHICS_NORMAL,1);
dmd.writePixel(59,11, GRAPHICS_NORMAL,1);
dmd.writePixel(59,12, GRAPHICS_NORMAL,1);
dmd.writePixel(60,6, GRAPHICS_NORMAL,1);
dmd.writePixel(60,8, GRAPHICS_NORMAL,1);
dmd.writePixel(60,9, GRAPHICS_NORMAL,1);
dmd.writePixel(60,10, GRAPHICS_NORMAL,1);
dmd.writePixel(60,11, GRAPHICS_NORMAL,1);
dmd.writePixel(60,12, GRAPHICS_NORMAL,1);
dmd.writePixel(61,9, GRAPHICS_NORMAL,1);
dmd.writePixel(61,11, GRAPHICS_NORMAL,1);
dmd.writePixel(61,12, GRAPHICS_NORMAL,1);
dmd.writePixel(62,12, GRAPHICS_NORMAL,1);

delay ( 5000 );  // display scene for 5 seconds.

   dmd.clearScreen( true );
  
   // THE FIFTH MESSAGE - COUNTDOWN TO C-DAY
   dmd.selectFont(Arial_Black_16);
   int day = Time.day();
   int christmas = 25;
   int SleepsUntilChristmas = (christmas - day);
   
   char msgFive[] = " sleeps until Christmas";
   remainingDays = SleepsUntilChristmas + msgFive;
   int remainingDaysLength = 25;
   dmd.drawMarquee(remainingDays,remainingDaysLength,(32*DISPLAYS_ACROSS)-1,0);
   start=millis();
   timer=start;
   ret=false;
   while(!ret){
     if ((timer+30) < millis()) {
       ret=dmd.stepMarquee(-1,0);
       timer=millis();
     }
   }
   
   // THE SIXTH MESSAGE - DRAW A (Mario) STAR
   // Created with the spreadsheet by jedihermit@Freetronics Forums
dmd.writePixel(1,5, GRAPHICS_NORMAL,1);
dmd.writePixel(1,6, GRAPHICS_NORMAL,1);
dmd.writePixel(1,14, GRAPHICS_NORMAL,1);
dmd.writePixel(1,15, GRAPHICS_NORMAL,1);
dmd.writePixel(2,5, GRAPHICS_NORMAL,1);
dmd.writePixel(2,7, GRAPHICS_NORMAL,1);
dmd.writePixel(2,12, GRAPHICS_NORMAL,1);
dmd.writePixel(2,13, GRAPHICS_NORMAL,1);
dmd.writePixel(2,15, GRAPHICS_NORMAL,1);
dmd.writePixel(3,5, GRAPHICS_NORMAL,1);
dmd.writePixel(3,8, GRAPHICS_NORMAL,1);
dmd.writePixel(3,10, GRAPHICS_NORMAL,1);
dmd.writePixel(3,11, GRAPHICS_NORMAL,1);
dmd.writePixel(3,15, GRAPHICS_NORMAL,1);
dmd.writePixel(4,5, GRAPHICS_NORMAL,1);
dmd.writePixel(4,9, GRAPHICS_NORMAL,1);
dmd.writePixel(4,15, GRAPHICS_NORMAL,1);
dmd.writePixel(5,5, GRAPHICS_NORMAL,1);
dmd.writePixel(5,14, GRAPHICS_NORMAL,1);
dmd.writePixel(6,3, GRAPHICS_NORMAL,1);
dmd.writePixel(6,4, GRAPHICS_NORMAL,1);
dmd.writePixel(6,9, GRAPHICS_NORMAL,1);
dmd.writePixel(6,13, GRAPHICS_NORMAL,1);
dmd.writePixel(7,1, GRAPHICS_NORMAL,1);
dmd.writePixel(7,2, GRAPHICS_NORMAL,1);
dmd.writePixel(7,6, GRAPHICS_NORMAL,1);
dmd.writePixel(7,7, GRAPHICS_NORMAL,1);
dmd.writePixel(7,10, GRAPHICS_NORMAL,1);
dmd.writePixel(7,13, GRAPHICS_NORMAL,1);
dmd.writePixel(8,0, GRAPHICS_NORMAL,1);
dmd.writePixel(8,10, GRAPHICS_NORMAL,1);
dmd.writePixel(8,12, GRAPHICS_NORMAL,1);
dmd.writePixel(9,1, GRAPHICS_NORMAL,1);
dmd.writePixel(9,2, GRAPHICS_NORMAL,1);
dmd.writePixel(9,6, GRAPHICS_NORMAL,1);
dmd.writePixel(9,7, GRAPHICS_NORMAL,1);
dmd.writePixel(9,10, GRAPHICS_NORMAL,1);
dmd.writePixel(9,13, GRAPHICS_NORMAL,1);
dmd.writePixel(10,3, GRAPHICS_NORMAL,1);
dmd.writePixel(10,4, GRAPHICS_NORMAL,1);
dmd.writePixel(10,9, GRAPHICS_NORMAL,1);
dmd.writePixel(10,13, GRAPHICS_NORMAL,1);
dmd.writePixel(11,5, GRAPHICS_NORMAL,1);
dmd.writePixel(11,14, GRAPHICS_NORMAL,1);
dmd.writePixel(12,5, GRAPHICS_NORMAL,1);
dmd.writePixel(12,9, GRAPHICS_NORMAL,1);
dmd.writePixel(12,15, GRAPHICS_NORMAL,1);
dmd.writePixel(13,5, GRAPHICS_NORMAL,1);
dmd.writePixel(13,8, GRAPHICS_NORMAL,1);
dmd.writePixel(13,10, GRAPHICS_NORMAL,1);
dmd.writePixel(13,11, GRAPHICS_NORMAL,1);
dmd.writePixel(13,15, GRAPHICS_NORMAL,1);
dmd.writePixel(14,5, GRAPHICS_NORMAL,1);
dmd.writePixel(14,7, GRAPHICS_NORMAL,1);
dmd.writePixel(14,12, GRAPHICS_NORMAL,1);
dmd.writePixel(14,13, GRAPHICS_NORMAL,1);
dmd.writePixel(14,15, GRAPHICS_NORMAL,1);
dmd.writePixel(15,5, GRAPHICS_NORMAL,1);
dmd.writePixel(15,6, GRAPHICS_NORMAL,1);
dmd.writePixel(15,14, GRAPHICS_NORMAL,1);
dmd.writePixel(15,15, GRAPHICS_NORMAL,1);

delay (1000);
dmd.clearScreen( true );
//  Move to the right of the first panel
dmd.writePixel(17,5, GRAPHICS_NORMAL,1);
dmd.writePixel(17,6, GRAPHICS_NORMAL,1);
dmd.writePixel(17,14, GRAPHICS_NORMAL,1);
dmd.writePixel(17,15, GRAPHICS_NORMAL,1);
dmd.writePixel(18,5, GRAPHICS_NORMAL,1);
dmd.writePixel(18,7, GRAPHICS_NORMAL,1);
dmd.writePixel(18,12, GRAPHICS_NORMAL,1);
dmd.writePixel(18,13, GRAPHICS_NORMAL,1);
dmd.writePixel(18,15, GRAPHICS_NORMAL,1);
dmd.writePixel(19,5, GRAPHICS_NORMAL,1);
dmd.writePixel(19,8, GRAPHICS_NORMAL,1);
dmd.writePixel(19,10, GRAPHICS_NORMAL,1);
dmd.writePixel(19,11, GRAPHICS_NORMAL,1);
dmd.writePixel(19,15, GRAPHICS_NORMAL,1);
dmd.writePixel(20,5, GRAPHICS_NORMAL,1);
dmd.writePixel(20,9, GRAPHICS_NORMAL,1);
dmd.writePixel(20,15, GRAPHICS_NORMAL,1);
dmd.writePixel(21,5, GRAPHICS_NORMAL,1);
dmd.writePixel(21,14, GRAPHICS_NORMAL,1);
dmd.writePixel(22,3, GRAPHICS_NORMAL,1);
dmd.writePixel(22,4, GRAPHICS_NORMAL,1);
dmd.writePixel(22,9, GRAPHICS_NORMAL,1);
dmd.writePixel(22,13, GRAPHICS_NORMAL,1);
dmd.writePixel(23,1, GRAPHICS_NORMAL,1);
dmd.writePixel(23,2, GRAPHICS_NORMAL,1);
dmd.writePixel(23,6, GRAPHICS_NORMAL,1);
dmd.writePixel(23,7, GRAPHICS_NORMAL,1);
dmd.writePixel(23,10, GRAPHICS_NORMAL,1);
dmd.writePixel(23,13, GRAPHICS_NORMAL,1);
dmd.writePixel(24,0, GRAPHICS_NORMAL,1);
dmd.writePixel(24,10, GRAPHICS_NORMAL,1);
dmd.writePixel(24,12, GRAPHICS_NORMAL,1);
dmd.writePixel(25,1, GRAPHICS_NORMAL,1);
dmd.writePixel(25,2, GRAPHICS_NORMAL,1);
dmd.writePixel(25,6, GRAPHICS_NORMAL,1);
dmd.writePixel(25,7, GRAPHICS_NORMAL,1);
dmd.writePixel(25,10, GRAPHICS_NORMAL,1);
dmd.writePixel(25,13, GRAPHICS_NORMAL,1);
dmd.writePixel(26,3, GRAPHICS_NORMAL,1);
dmd.writePixel(26,4, GRAPHICS_NORMAL,1);
dmd.writePixel(26,9, GRAPHICS_NORMAL,1);
dmd.writePixel(26,13, GRAPHICS_NORMAL,1);
dmd.writePixel(27,5, GRAPHICS_NORMAL,1);
dmd.writePixel(27,14, GRAPHICS_NORMAL,1);
dmd.writePixel(28,5, GRAPHICS_NORMAL,1);
dmd.writePixel(28,9, GRAPHICS_NORMAL,1);
dmd.writePixel(28,15, GRAPHICS_NORMAL,1);
dmd.writePixel(29,5, GRAPHICS_NORMAL,1);
dmd.writePixel(29,8, GRAPHICS_NORMAL,1);
dmd.writePixel(29,10, GRAPHICS_NORMAL,1);
dmd.writePixel(29,11, GRAPHICS_NORMAL,1);
dmd.writePixel(29,15, GRAPHICS_NORMAL,1);
dmd.writePixel(30,5, GRAPHICS_NORMAL,1);
dmd.writePixel(30,7, GRAPHICS_NORMAL,1);
dmd.writePixel(30,12, GRAPHICS_NORMAL,1);
dmd.writePixel(30,13, GRAPHICS_NORMAL,1);
dmd.writePixel(30,15, GRAPHICS_NORMAL,1);
dmd.writePixel(31,5, GRAPHICS_NORMAL,1);
dmd.writePixel(31,6, GRAPHICS_NORMAL,1);
dmd.writePixel(31,14, GRAPHICS_NORMAL,1);
dmd.writePixel(31,15, GRAPHICS_NORMAL,1);

delay (1000);
dmd.clearScreen( true );
//  Second panel, left side
dmd.writePixel(33,5, GRAPHICS_NORMAL,1);
dmd.writePixel(33,6, GRAPHICS_NORMAL,1);
dmd.writePixel(33,14, GRAPHICS_NORMAL,1);
dmd.writePixel(33,15, GRAPHICS_NORMAL,1);
dmd.writePixel(34,5, GRAPHICS_NORMAL,1);
dmd.writePixel(34,7, GRAPHICS_NORMAL,1);
dmd.writePixel(34,12, GRAPHICS_NORMAL,1);
dmd.writePixel(34,13, GRAPHICS_NORMAL,1);
dmd.writePixel(34,15, GRAPHICS_NORMAL,1);
dmd.writePixel(35,5, GRAPHICS_NORMAL,1);
dmd.writePixel(35,8, GRAPHICS_NORMAL,1);
dmd.writePixel(35,10, GRAPHICS_NORMAL,1);
dmd.writePixel(35,11, GRAPHICS_NORMAL,1);
dmd.writePixel(35,15, GRAPHICS_NORMAL,1);
dmd.writePixel(36,5, GRAPHICS_NORMAL,1);
dmd.writePixel(36,9, GRAPHICS_NORMAL,1);
dmd.writePixel(36,15, GRAPHICS_NORMAL,1);
dmd.writePixel(37,5, GRAPHICS_NORMAL,1);
dmd.writePixel(37,14, GRAPHICS_NORMAL,1);
dmd.writePixel(38,3, GRAPHICS_NORMAL,1);
dmd.writePixel(38,4, GRAPHICS_NORMAL,1);
dmd.writePixel(38,9, GRAPHICS_NORMAL,1);
dmd.writePixel(38,13, GRAPHICS_NORMAL,1);
dmd.writePixel(39,1, GRAPHICS_NORMAL,1);
dmd.writePixel(39,2, GRAPHICS_NORMAL,1);
dmd.writePixel(39,6, GRAPHICS_NORMAL,1);
dmd.writePixel(39,7, GRAPHICS_NORMAL,1);
dmd.writePixel(39,10, GRAPHICS_NORMAL,1);
dmd.writePixel(39,13, GRAPHICS_NORMAL,1);
dmd.writePixel(40,0, GRAPHICS_NORMAL,1);
dmd.writePixel(40,10, GRAPHICS_NORMAL,1);
dmd.writePixel(40,12, GRAPHICS_NORMAL,1);
dmd.writePixel(41,1, GRAPHICS_NORMAL,1);
dmd.writePixel(41,2, GRAPHICS_NORMAL,1);
dmd.writePixel(41,6, GRAPHICS_NORMAL,1);
dmd.writePixel(41,7, GRAPHICS_NORMAL,1);
dmd.writePixel(41,10, GRAPHICS_NORMAL,1);
dmd.writePixel(41,13, GRAPHICS_NORMAL,1);
dmd.writePixel(42,3, GRAPHICS_NORMAL,1);
dmd.writePixel(42,4, GRAPHICS_NORMAL,1);
dmd.writePixel(42,9, GRAPHICS_NORMAL,1);
dmd.writePixel(42,13, GRAPHICS_NORMAL,1);
dmd.writePixel(43,5, GRAPHICS_NORMAL,1);
dmd.writePixel(43,14, GRAPHICS_NORMAL,1);
dmd.writePixel(44,5, GRAPHICS_NORMAL,1);
dmd.writePixel(44,9, GRAPHICS_NORMAL,1);
dmd.writePixel(44,15, GRAPHICS_NORMAL,1);
dmd.writePixel(45,5, GRAPHICS_NORMAL,1);
dmd.writePixel(45,8, GRAPHICS_NORMAL,1);
dmd.writePixel(45,10, GRAPHICS_NORMAL,1);
dmd.writePixel(45,11, GRAPHICS_NORMAL,1);
dmd.writePixel(45,15, GRAPHICS_NORMAL,1);
dmd.writePixel(46,5, GRAPHICS_NORMAL,1);
dmd.writePixel(46,7, GRAPHICS_NORMAL,1);
dmd.writePixel(46,12, GRAPHICS_NORMAL,1);
dmd.writePixel(46,13, GRAPHICS_NORMAL,1);
dmd.writePixel(46,15, GRAPHICS_NORMAL,1);
dmd.writePixel(47,5, GRAPHICS_NORMAL,1);
dmd.writePixel(47,6, GRAPHICS_NORMAL,1);
dmd.writePixel(47,14, GRAPHICS_NORMAL,1);
dmd.writePixel(47,15, GRAPHICS_NORMAL,1);

delay (1000);
dmd.clearScreen( true );
//  Second panel, right side
dmd.writePixel(49,5, GRAPHICS_NORMAL,1);
dmd.writePixel(49,6, GRAPHICS_NORMAL,1);
dmd.writePixel(49,14, GRAPHICS_NORMAL,1);
dmd.writePixel(49,15, GRAPHICS_NORMAL,1);
dmd.writePixel(50,5, GRAPHICS_NORMAL,1);
dmd.writePixel(50,7, GRAPHICS_NORMAL,1);
dmd.writePixel(50,12, GRAPHICS_NORMAL,1);
dmd.writePixel(50,13, GRAPHICS_NORMAL,1);
dmd.writePixel(50,15, GRAPHICS_NORMAL,1);
dmd.writePixel(51,5, GRAPHICS_NORMAL,1);
dmd.writePixel(51,8, GRAPHICS_NORMAL,1);
dmd.writePixel(51,10, GRAPHICS_NORMAL,1);
dmd.writePixel(51,11, GRAPHICS_NORMAL,1);
dmd.writePixel(51,15, GRAPHICS_NORMAL,1);
dmd.writePixel(52,5, GRAPHICS_NORMAL,1);
dmd.writePixel(52,9, GRAPHICS_NORMAL,1);
dmd.writePixel(52,15, GRAPHICS_NORMAL,1);
dmd.writePixel(53,5, GRAPHICS_NORMAL,1);
dmd.writePixel(53,14, GRAPHICS_NORMAL,1);
dmd.writePixel(54,3, GRAPHICS_NORMAL,1);
dmd.writePixel(54,4, GRAPHICS_NORMAL,1);
dmd.writePixel(54,9, GRAPHICS_NORMAL,1);
dmd.writePixel(54,13, GRAPHICS_NORMAL,1);
dmd.writePixel(55,1, GRAPHICS_NORMAL,1);
dmd.writePixel(55,2, GRAPHICS_NORMAL,1);
dmd.writePixel(55,6, GRAPHICS_NORMAL,1);
dmd.writePixel(55,7, GRAPHICS_NORMAL,1);
dmd.writePixel(55,10, GRAPHICS_NORMAL,1);
dmd.writePixel(55,13, GRAPHICS_NORMAL,1);
dmd.writePixel(56,0, GRAPHICS_NORMAL,1);
dmd.writePixel(56,10, GRAPHICS_NORMAL,1);
dmd.writePixel(56,12, GRAPHICS_NORMAL,1);
dmd.writePixel(57,1, GRAPHICS_NORMAL,1);
dmd.writePixel(57,2, GRAPHICS_NORMAL,1);
dmd.writePixel(57,6, GRAPHICS_NORMAL,1);
dmd.writePixel(57,7, GRAPHICS_NORMAL,1);
dmd.writePixel(57,10, GRAPHICS_NORMAL,1);
dmd.writePixel(57,13, GRAPHICS_NORMAL,1);
dmd.writePixel(58,3, GRAPHICS_NORMAL,1);
dmd.writePixel(58,4, GRAPHICS_NORMAL,1);
dmd.writePixel(58,9, GRAPHICS_NORMAL,1);
dmd.writePixel(58,13, GRAPHICS_NORMAL,1);
dmd.writePixel(59,5, GRAPHICS_NORMAL,1);
dmd.writePixel(59,14, GRAPHICS_NORMAL,1);
dmd.writePixel(60,5, GRAPHICS_NORMAL,1);
dmd.writePixel(60,9, GRAPHICS_NORMAL,1);
dmd.writePixel(60,15, GRAPHICS_NORMAL,1);
dmd.writePixel(61,5, GRAPHICS_NORMAL,1);
dmd.writePixel(61,8, GRAPHICS_NORMAL,1);
dmd.writePixel(61,10, GRAPHICS_NORMAL,1);
dmd.writePixel(61,11, GRAPHICS_NORMAL,1);
dmd.writePixel(61,15, GRAPHICS_NORMAL,1);
dmd.writePixel(62,5, GRAPHICS_NORMAL,1);
dmd.writePixel(62,7, GRAPHICS_NORMAL,1);
dmd.writePixel(62,12, GRAPHICS_NORMAL,1);
dmd.writePixel(62,13, GRAPHICS_NORMAL,1);
dmd.writePixel(62,15, GRAPHICS_NORMAL,1);
dmd.writePixel(63,5, GRAPHICS_NORMAL,1);
dmd.writePixel(63,6, GRAPHICS_NORMAL,1);
dmd.writePixel(63,14, GRAPHICS_NORMAL,1);
dmd.writePixel(63,15, GRAPHICS_NORMAL,1);
// Display the star for 2 seconds before we repeat the loop
delay(2000);
}

Post Reply