POWERPIN -> BUTTON_POWER_PIN

This commit is contained in:
Julien Cabillot 2017-08-01 17:56:47 +02:00 committed by Cabillot Julien
parent 41ab2ebf0d
commit eb78801b22
2 changed files with 8 additions and 6 deletions

View File

@ -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

View File

@ -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];