From 6d76088bc8c8f47a77174ab8ebd9c2277ffc06da Mon Sep 17 00:00:00 2001 From: Stefan Heinrichsen Date: Sat, 15 Jun 2019 12:52:45 +0200 Subject: [PATCH] =?UTF-8?q?Kleinere=20=C3=84nderungen=20f=C3=BCr=20den=20W?= =?UTF-8?q?S2812b=20Schaufenster-Streifen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FastTouch.ino | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/FastTouch.ino b/FastTouch.ino index 1c46333..198506c 100644 --- a/FastTouch.ino +++ b/FastTouch.ino @@ -1,23 +1,24 @@ #include #define WS_PIN 2 // On Trinket or Gemma, suggest changing this to 1 -#define NUMPIXELS 113 // Popular NeoPixel ring size +#define NUMPIXELS 113 // 113=UNHB Popular NeoPixel ring size #define TOUCH_PIN 4 //Für Touch: 2, 4, 12, 13, 14, 15, 27 -NeoPixelBus strip(NUMPIXELS, WS_PIN); +NeoPixelBus strip(NUMPIXELS, WS_PIN); int touch_value = 100; int i = 0; int d = 1; -RgbwColor black(0); -RgbwColor white(255); +RgbColor black(0); +RgbColor white(255); +RgbColor farbe; void setup() { Serial.begin(115200); - Serial.println("Touch Test"); + //Serial.println("Touch Test"); - Serial.println("Switching off all LEDs"); + //Serial.println("Switching off all LEDs"); strip.Begin(); //strip.SetBrightness(128); strip.ClearTo(black); @@ -27,9 +28,9 @@ void setup() { void loop(){ touch_value = touchRead(TOUCH_PIN); - if ( (touch_value>10) && (touch_value < 50)) { - //Serial.print("Touch @ "); - Serial.print("@"); + if ( (touch_value>42) && (touch_value < 47)) { + Serial.print("Touch @ "); + Serial.println(touch_value); i+=d; } //Serial.println(touch_value); @@ -40,5 +41,5 @@ void loop(){ if(i>=NUMPIXELS ) { d=(-1); } if(i<=0 ) { d=1; } - delay(10); + //delay(10); }