/* * Copyright (C) 2013 Gilad Dayagi. All rights reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. */ /* * An example for the Arduino particle system library * Creates a spinning galaxy effect */ //'r' for rainbowduino, 'c' for colorduino #define BOARD 'r' #if BOARD == 'c' #include #else #include #endif #include "ParticleSys.h" #include "Particle_Bounce.h" #include "Emitter_Spin.h" #include "PartMatrix.h" const byte numParticles = 60; Particle_Bounce particles[numParticles]; Emitter_Spin emitter(112, 112, 5, 7); ParticleSys pSys(numParticles, particles, &emitter); PartMatrix pMatrix; /** * Render the particles into a low-resolution matrix */ void drawMatrix(){ pMatrix.fade(); pMatrix.render(particles, numParticles); //update the actual LED matrix for (byte y=0;y