Browse Source

POWERPIN -> BUTTON_POWER_PIN

master
Julien Cabillot 3 years ago
committed by Cabillot Julien
parent
commit
eb78801b22
2 changed files with 8 additions and 6 deletions
  1. 6
      src/ledmask.cpp
  2. 8
      src/ledmask.h

6
src/ledmask.cpp

@ -53,8 +53,8 @@ void setup() {
/** BOUTON **/ /** BOUTON **/
// powering button // 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: // initialize the pushbutton pin as an input:
pinMode(BUTTON_PIN, INPUT); pinMode(BUTTON_PIN, INPUT);
buttonState = 0; 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. // Add entropy to random number generator; we use a lot of it.
random16_add_entropy(random()); random16_add_entropy(random());
Fire2012(); // run simulation frame Fire2012(); // run simulation frame

8
src/ledmask.h

@ -1,18 +1,18 @@
#define SERIAL_SPEED 115200 #define SERIAL_SPEED 115200
/** BOUTON **/ /** BOUTON **/
#define POWERPIN 2
#define BUTTON_POWER_PIN 2
#define BUTTON_PIN 8 #define BUTTON_PIN 8
int buttonState; int buttonState;
/** LED **/ /** LED **/
#define LED_PIN 5
#define LED_PIN 5
#define LED_CHIPSET WS2812B #define LED_CHIPSET WS2812B
#define LED_COLOR_ORDER GRB #define LED_COLOR_ORDER GRB
#define LED_NUM 30
#define LED_NUM 30
#define LED_BRIGHTNESS 200 #define LED_BRIGHTNESS 200
#define LED_FPS 60
#define LED_FPS 60
const bool gReverseDirection = false; const bool gReverseDirection = false;
CRGB leds[LED_NUM]; CRGB leds[LED_NUM];

Loading…
Cancel
Save