/* Project: 3x3x3 Mono LED Cube (r3). * File: MVPulse.cpp * Description: * Movie -- mv_Pulse * Fade in and out all LEDs together. * * Copyright (C) 2014 Marc Symonds * All rights reserved. * * This software may be used and redistributed, with or without * modification, as long as it is understood that this software * is provided as-is without any explicit or implied warranties * of merchantablity or fitness of purpose. */ #include "Arduino.h" #include "Movies.h" #include "DisplayFrame.h" void mv_Pulse() { unsigned long ts; byte x, y; ts = millis() + (DEF_MOVIE_TIME / 2); while (millis() < ts) { for (y = 0 ; y <= MAXBRIGHTNESSLEVEL ; y++) { for (x = 0 ; x < 27 ; x++) displayFrame[x] = y; delay(50); } delay(100); for (y = MAXBRIGHTNESSLEVEL - 1 ; y > 0 ; y--) { for (x = 0 ; x < 27 ; x++) displayFrame[x] = y; delay(50); } df_clear(); delay(500); } }
Recent Comments