/ 3D_Printed_NeoPixel_Ring_Hair_Dress / GemmaHoopActionList.h
GemmaHoopActionList.h
  1  // SPDX-FileCopyrightText: 2014 HerrRausB https://github.com/HerrRausB
  2  //
  3  // SPDX-License-Identifier: LGPL-3.0-or-later
  4  //
  5  /******************************************************************************
  6   *
  7   * this file is part of the gemma hoop animator example sketch
  8   *
  9   * it is free software: you can redistribute it and/or modify
 10   * it under the terms of the GNU Lesser General Public License as
 11   * published by the Free Software Foundation, either version 3 of
 12   * the License, or (at your option) any later version.
 13   *
 14   * it is distributed in the hope that it will be useful,
 15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
 16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  see the
 17   * GNU Lesser General Public License for more details.
 18   *
 19   * you should have received a copy of the GNU Lesser General Public
 20   * License along with NeoPixel.  If not, see
 21   * <http://www.gnu.org/licenses/>.
 22   *
 23   * ----------------------------------------------------------------------------
 24   *
 25   * use this file to set up your individual animation actions and
 26   * general settings and then simply recompile the sketch
 27   *
 28   * the number of actions possible is limited by the RAM of the used µC. shall
 29   * the list be too long, the µC will crash and nothing will go on.
 30   *
 31   * ----------------------------------------------------------------------------
 32   *
 33   * AND NOW HAVE FUN! :-)
 34   *
 35   ******************************************************************************/
 36  
 37  #ifndef _GEMMA_HOOP_ACTIONLIST_H_
 38  #define _GEMMA_HOOP_ACTIONLIST_H_
 39  
 40  #include "GemmaHoopDefs.h"
 41  
 42  /******************************************************************************
 43   *
 44   * general settings
 45   *
 46   ******************************************************************************/
 47  
 48  #define PIXEL_OUTPUT 0           // output pin the NeoPixels are connected to
 49  #define ANALOG_INPUT 0           // needed to seed the random generator
 50  #define NUM_PIXELS 16            // total number of NeoPixels
 51  #define BRIGHTNESS 30            // overall brightness of NeoPixels
 52  
 53  /******************************************************************************
 54   *
 55   * defining the animation actions by simply initializing the array of actions
 56   * this array variable must be called theActionList !!!
 57   *
 58   * valid actions are:
 59   *    ACT_NOP                     simply do nothing and switch everything off
 60   *    ACT_SIMPLE_RING             all leds on
 61   *    ACT_CYCLING_RING_ACLK       anti clockwise cycling colors 
 62   *    ACT_CYCLING_RING_CLKW       clockwise cycling colors acording 
 63   *    ACT_WHEEL_ACLK              anti clockwise spinning wheel 
 64   *    ACT_WHEEL_CLKW              clockwise spinning wheel 
 65   *    ACT_SPARKLING_RING          sparkling effect 
 66   *
 67   * valid color options are:
 68   *    COL_RANDOM                  colors will be selected randomly, which might  
 69   *                                be not very sufficient due to well known 
 70   *                                limitations of the random generation algorithm
 71   *    COL_SPECTRUM                colors will be set as cyclic spectral wipe 
 72   *                                R -> G -> B -> R -> G -> B -> R -> ...
 73   *
 74   ******************************************************************************/
 75  
 76  actionlist theActionList =
 77  {
 78  //  action    action name &                          action step    color        color change
 79  //  duration  color generation method                duration       granularity  interval
 80    { 5000,     ACT_SPARKLING_RING | COL_RANDOM,       10,            25,          1000 },
 81    { 2000,     ACT_CYCLING_RING_CLKW | COL_RANDOM,    20,            1,           5 },
 82    { 5000,     ACT_SPARKLING_RING | COL_RANDOM,       10,            25,          1000 },
 83    { 2000,     ACT_CYCLING_RING_ACLK | COL_RANDOM,    20,            1,           5 },
 84    { 5000,     ACT_SPARKLING_RING | COL_RANDOM,       10,            25,          1000 },
 85    { 2500,     ACT_CYCLING_RING_CLKW | COL_SPECTRUM,  25,            20,          20 },
 86    { 1000,     ACT_CYCLING_RING_CLKW | COL_SPECTRUM,  50,            1,           20 },
 87    { 750,      ACT_CYCLING_RING_CLKW | COL_SPECTRUM,  75,            1,           20 },
 88    { 500,      ACT_CYCLING_RING_CLKW | COL_SPECTRUM,  100,           1,           20 },
 89    { 500,      ACT_CYCLING_RING_CLKW | COL_SPECTRUM,  125,           1,           20 },
 90    { 500,      ACT_CYCLING_RING_CLKW | COL_SPECTRUM,  150,           1,           50 },
 91    { 500,      ACT_CYCLING_RING_CLKW | COL_SPECTRUM,  175,           1,           100 },
 92    { 500,      ACT_CYCLING_RING_CLKW | COL_SPECTRUM,  200,           1,           200 },
 93    { 750,      ACT_CYCLING_RING_CLKW | COL_SPECTRUM,  225,           1,           250 },
 94    { 1000,     ACT_CYCLING_RING_CLKW | COL_SPECTRUM,  250,           1,           350 },
 95    { 30000,    ACT_SIMPLE_RING | COL_SPECTRUM,        50,            1,           10 },
 96    { 2500,     ACT_WHEEL_ACLK | COL_SPECTRUM,         10,            1,           10 },
 97    { 2500,     ACT_WHEEL_ACLK | COL_SPECTRUM,         15,            1,           20 },
 98    { 2000,     ACT_WHEEL_ACLK | COL_SPECTRUM,         25,            1,           30 },
 99    { 1000,     ACT_WHEEL_ACLK | COL_SPECTRUM,         50,            1,           40 },
100    { 1000,     ACT_WHEEL_ACLK | COL_SPECTRUM,         75,            1,           40 },
101    { 1000,     ACT_WHEEL_ACLK | COL_SPECTRUM,         100,           1,           50 },
102    { 500,      ACT_WHEEL_ACLK | COL_SPECTRUM,         125,           1,           60 },
103    { 500,      ACT_WHEEL_CLKW | COL_SPECTRUM,         125,           5,           50 },
104    { 1000,     ACT_WHEEL_CLKW | COL_SPECTRUM,         100,           10,          40 },
105    { 1500,     ACT_WHEEL_CLKW | COL_SPECTRUM,         75,            15,          30 },
106    { 2000,     ACT_WHEEL_CLKW | COL_SPECTRUM,         50,            20,          20 },
107    { 2500,     ACT_WHEEL_CLKW | COL_SPECTRUM,         25,            25,          10 },
108    { 3000,     ACT_WHEEL_CLKW | COL_SPECTRUM,         10,            30,          5 },
109    { 5000,     ACT_SPARKLING_RING | COL_RANDOM,       10,            25,          1000 },
110    { 5000,     ACT_NOP,                               0,             0,           0 }
111  };
112  
113  #endif