led_effects.h 1.03 KB
Newer Older
1
2
3
4
#ifndef LED_EFFECTS_H_INCLUDED
#define LED_EFFECTS_H_INCLUDED
#include <Arduino.h>
#include "config.h"
Eric Duminil's avatar
Eric Duminil committed
5
#include "sensor_console.h"
6
7
8
9

// Adafruit NeoPixel (Arduino library for controlling single-wire-based LED pixels and strip)
// https://github.com/adafruit/Adafruit_NeoPixel
// Documentation : http://adafruit.github.io/Adafruit_NeoPixel/html/class_adafruit___neo_pixel.html
10
11
12
13
14
15
16
17
18
19
#include "src/lib/Adafruit_NeoPixel/Adafruit_NeoPixel.h"

namespace color {
  const uint32_t red = 0xFF0000;
  const uint32_t green = 0x00FF00;
  const uint32_t blue = 0x0000FF;
  const uint32_t black = 0x000000;
  const uint32_t magenta = 0xFF00FF;
}

20
namespace led_effects {
21
22
23
24
  void setupOnBoardLED();
  void onBoardLEDOff();
  void onBoardLEDOn();
  void toggleNightMode();
Eric Duminil's avatar
Eric Duminil committed
25
  void LEDsOff();
26
27
28

  void setupRing();
  void redAlert();
29
  void greenAlert();
30
31
32
  int countdownToZero();
  void showWaitingLED(uint32_t color);
  void showKITTWheel(uint32_t color, uint16_t duration_s = 2);
33
  void showRainbowWheel(uint16_t duration_ms = 1000);
34
35
36
  void displayCO2color(uint16_t co2);
}
#endif