// MonkeyPoV Hardware Code // This code will run an arduino with a 10 LED array and a pre-formatted data stream from MPoVConvert // More information at betaorbust.com // // Written By: Jacques Favreau // Created: Jan 19th 2007 // The output bit stream from MPoVConverter int OutputStream[300]={1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int StreamLen=300; // The length of the output stream int PxDuration=10; // The per-pixel duration int MessageDelay=500; // The delay before the mesasge repeats int i; // counter init // set up the pixel addresses for the LED array; // I chose not to use address 0 and 1 as they can be used for a later bluetooth serial mod I have in mind. int px0 = 2; int px1 = 3; int px2 = 4; int px3 = 5; int px4 = 6; int px5 = 7; int px6 = 8; int px7 = 9; int px8 = 10; int px9 = 11; // setup will initialize the output pins and flash px9 for half a second on startup. void setup(){ pinMode(px0, OUTPUT); pinMode(px1, OUTPUT); pinMode(px2, OUTPUT); pinMode(px3, OUTPUT); pinMode(px4, OUTPUT); pinMode(px5, OUTPUT); pinMode(px6, OUTPUT); pinMode(px7, OUTPUT); pinMode(px8, OUTPUT); pinMode(px9, OUTPUT); digitalWrite(px9, HIGH); delay(500); digitalWrite(px9, LOW); delay(500); } // The main loop. Runs through the data stream sending it to // the array as needed and pausing for the duration of the pixel void loop(){ // run through the entire data stream for (i=0;i