#include Peggy2 displayArea; // Make a first frame buffer object, called displayArea /* uint32_t ddata1[] = { 0x00000337, 0x00dee63d, 0x00e7c66d, 0x00c38667, 0x00c38361, 0x00c78061, 0x00fc8061, 0x00c0e06f, 0x00c28761, 0x00fbf031, 0x00c6d031, 0x00cc7000, 0x00000000, 0x0000e03d, 0x0000716e, 0x00f0306c, 0x001c306c, 0x0006703c, 0x0006c00f, 0x0006070c, 0x000e200c, 0x00f8b07f, 0x0000600c, 0x0000c00c, 0x00000000 }; */ uint32_t ddata1[] = { 0x00000000, 0x003703de, 0x003de6e7, 0x006dc6c3, 0x006786c3, 0x006183c7, 0x006180fc, 0x006180c0, 0x006fe0c2, 0x006187fb, 0x0031f0c6, 0x0031d0cc, 0x00007000, 0x00000000, 0x003de000, 0x006e71f0, 0x006c301c, 0x006c3006, 0x003c7006, 0x000fc006, 0x000c070e, 0x000c20f8, 0x007fb000, 0x000c6000, 0x000cc000, 0x00000000 }; /* 0x00000408, 0x20000408, 0x20000408, 0x20000408, 0x20000408, 0x2000ffff, 0xff800408, 0x20000408, 0x20000408, 0x20000408, 0x20000408, 0x20000408, 0x20000408, 0x2000ffff, 0xff800408, 0x20000408, 20 00 04 08 20 00 04 08 20 00 04 08 20 00 04 08 20 00 04 08 20 00 04 08 20 00 ff ff ff 80 04 08 20 00 04 08 20 00 00 00 */ void setup() // run once, when the sketch starts { uint8_t xpos,ypos,nypos; uint32_t maskpat; uint32_t tmp_data; uint16_t datapos; displayArea.HardwareInit(); // Call this once to init the hardware. // (Only needed once, even if you've got lots of frames.) datapos=0; for(ypos=25;ypos>0;ypos--){ nypos = ypos - 1; tmp_data = ddata1[datapos]; maskpat = 0x00800000; for(xpos=0;xpos<25;xpos++){ if((tmp_data & maskpat) != 0 ){ displayArea.SetPoint(xpos, nypos); }else{ displayArea.ClearPoint(xpos, nypos); } maskpat = maskpat>>1; } datapos++; } } // End void setup() void loop() // run over and over again { displayArea.RefreshAll(1); }