Import ESP_UniClock (upstream 1189810)
Vendored from https://github.com/gpeter62/ESP_UniClock: the sketch source, the web UI and the libraries the ESP8266 build needs, unpacked from the bundled zips. Adds a PlatformIO project for the ESP-12. The source is unchanged; local changes follow as separate commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8efa810e4e
commit
b347f1c63f
843 files changed
+122061
No files matched your search
+36
@@ -0,0 +1,36 @@
|
||||
// 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.RotateRight(1); // reads right to left, so it is reversed
|
||||
strip.Show();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user