From eb78801b22ca6244d3a513a2a5fc8008ede0ab47 Mon Sep 17 00:00:00 2001 From: Julien Cabillot Date: Tue, 1 Aug 2017 17:56:47 +0200 Subject: [PATCH] POWERPIN -> BUTTON_POWER_PIN --- src/ledmask.cpp | 6 ++++-- src/ledmask.h | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ledmask.cpp b/src/ledmask.cpp index de2b1f3..73e2306 100644 --- a/src/ledmask.cpp +++ b/src/ledmask.cpp @@ -53,8 +53,8 @@ void setup() { /** BOUTON **/ // powering button - pinMode(POWERPIN, OUTPUT); - digitalWrite(POWERPIN, HIGH); + pinMode(BUTTON_POWER_PIN, OUTPUT); + digitalWrite(BUTTON_POWER_PIN, HIGH); // initialize the pushbutton pin as an input: pinMode(BUTTON_PIN, INPUT); buttonState = 0; @@ -77,6 +77,8 @@ void loop() { } } + /** LEDS **/ + // TODO : il faudra ici conditioner l'animation au fait que le button n'ai pas été pressé // Add entropy to random number generator; we use a lot of it. random16_add_entropy(random()); Fire2012(); // run simulation frame diff --git a/src/ledmask.h b/src/ledmask.h index fd6640b..47649ad 100644 --- a/src/ledmask.h +++ b/src/ledmask.h @@ -1,18 +1,18 @@ #define SERIAL_SPEED 115200 /** BOUTON **/ -#define POWERPIN 2 +#define BUTTON_POWER_PIN 2 #define BUTTON_PIN 8 int buttonState; /** LED **/ -#define LED_PIN 5 +#define LED_PIN 5 #define LED_CHIPSET WS2812B #define LED_COLOR_ORDER GRB -#define LED_NUM 30 +#define LED_NUM 30 #define LED_BRIGHTNESS 200 -#define LED_FPS 60 +#define LED_FPS 60 const bool gReverseDirection = false; CRGB leds[LED_NUM];