Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
ab83b511
Commit
ab83b511
authored
Dec 18, 2020
by
Eric Duminil
Browse files
Moving LED from GPIO5 to GPIO23 on ESP32
parent
db05088c
Changes
2
Hide whitespace changes
Inline
Side-by-side
led_effects.cpp
View file @
ab83b511
...
...
@@ -18,12 +18,14 @@ namespace config //TODO: Use a class instead. NightMode could then be another s
bool
night_mode
=
false
;
}
// 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
// NeoPixels on GPIO05, aka D1 on ESP8266 or 5 on ESP32.
#if defined(ESP8266)
// NeoPixels on GPIO05, aka D1 on ESP8266.
const
int
NEOPIXELS_PIN
=
5
;
#elif defined(ESP32)
// NeoPixels on GPIO23 on ESP32. To avoid conflict with LoRa_SCK on TTGO.
const
int
NEOPIXELS_PIN
=
23
;
#endif
const
int
NUMPIXELS
=
12
;
//NOTE: One value has been prepended, to make calculations easier and avoid out of bounds index.
const
uint16_t
CO2_TICKS
[
NUMPIXELS
+
1
]
=
{
0
,
500
,
600
,
700
,
800
,
900
,
1000
,
1200
,
1400
,
1600
,
1800
,
2000
,
2200
};
// [ppm]
...
...
led_effects.h
View file @
ab83b511
...
...
@@ -3,6 +3,10 @@
#include
<Arduino.h>
#include
"util.h"
#include
"config.h"
// 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
#include
"src/lib/Adafruit_NeoPixel/Adafruit_NeoPixel.h"
namespace
color
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment