From 0cc531c7b38ef822b6543bb16bae46dc00e748f8 Mon Sep 17 00:00:00 2001 From: Fisch Date: Sun, 8 Apr 2018 19:47:34 +0200 Subject: [PATCH] changed wagoncolor by speed --- achterbahn.ino | 12 ++++++--- wagon.cpp | 71 ++++++++++++++++++++++++++++++++++++++++---------- wagon.h | 3 +++ 3 files changed, 69 insertions(+), 17 deletions(-) diff --git a/achterbahn.ino b/achterbahn.ino index cd18e9c..8f6da2b 100644 --- a/achterbahn.ino +++ b/achterbahn.ino @@ -11,6 +11,8 @@ Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); + + long lastPixelUpdate=0; #define PIXELUPDATETIME 10 long lastRoutineUpdate=0; @@ -19,6 +21,7 @@ long lastRoutineUpdate=0; long loopmillis=0; uint8_t height[NUMPIXELS]; +#define MAXHEIGHT 45 std::vector wagon_arr; uint8_t maxid=0; @@ -77,15 +80,15 @@ void setup() { previewHeightmap(); spawnWagon(); + spawnWagon(); } void previewHeightmap(){ - int maxheight=45; for (int i=0;i