* ili9341 update * update ili9341 * Update support_tasmota.ino * fix scripter bug * Deep+ * Update ILI9341_2.cpp Fix invert display * Update xdsp_04_ili9341.ino Fix display modes * fix ili9341 m5stack * Refactor DHT negative temps * Standardize on unconnected pin being -1 * Back to chain+ * Strict * strict * Update platformio_tasmota32.ini * Fix renderer * Change NeoPixelBus library from v2.6.0 to v2.6.1.4 * display batch * Update xdrv_13_display.ino * ldf strict Co-authored-by: gemu2015 <gmutz2010@googlemail.com> Co-authored-by: Theo Arends <11044339+arendst@users.noreply.github.com>
37 lines
945 B
C++
37 lines
945 B
C++
// NeoSegmentBus
|
|
// This example will demonstrate using the NeoSegmentBus which provides support for a
|
|
// seven segment LED digit driven by three WS2811; connected in series with other digits
|
|
//
|
|
// See https://shop.idlehandsdev.com/products/addressable-7-segment-display for a hardware example
|
|
//
|
|
// This example will print the string "3.14" and then rotate it through the available digits
|
|
//
|
|
|
|
#include <NeoPixelSegmentBus.h>
|
|
|
|
const uint16_t DigitCount = 4; // Max Digits, not segments, not pixels
|
|
const uint8_t BusPin = 2; // make sure to set this to the correct pin, ignored for Esp8266
|
|
|
|
#define brightness 128
|
|
|
|
NeoPixelSegmentBus<SevenSegmentFeature, NeoWs2811Method> strip(DigitCount, BusPin);
|
|
|
|
void setup()
|
|
{
|
|
strip.Begin();
|
|
strip.Show(); // clears all digits by default
|
|
|
|
delay(500);
|
|
strip.SetString(0, "3.14", brightness);
|
|
strip.Show();
|
|
}
|
|
|
|
void loop()
|
|
{
|
|
delay(2000);
|
|
|
|
strip.RotateLeft(1);
|
|
strip.Show();
|
|
}
|
|
|