updated libraries
This commit is contained in:
parent
d5d5d000b3
commit
3b7e68065a
102 changed files with 3020 additions and 1624 deletions
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
/*
|
||||
This demo is best viewed using the FastLED compiler.
|
||||
|
||||
Windows/MacOS binaries: https://github.com/FastLED/FastLED/releases
|
||||
|
||||
Python
|
||||
|
||||
Install: pip install fastled
|
||||
Run: fastled <this sketch directory>
|
||||
This will compile and preview the sketch in the browser, and enable
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
/*
|
||||
This demo is best viewed using the FastLED compiler.
|
||||
|
||||
Windows/MacOS binaries: https://github.com/FastLED/FastLED/releases
|
||||
|
||||
Python
|
||||
|
||||
Install: pip install fastled
|
||||
Run: fastled <this sketch directory>
|
||||
This will compile and preview the sketch in the browser, and enable
|
||||
|
|
@ -27,7 +32,6 @@ all the UI elements you see below.
|
|||
#include "src/xypaths.h"
|
||||
#include "fl/function.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
using namespace fl;
|
||||
|
||||
|
|
@ -37,8 +41,6 @@ using namespace fl;
|
|||
#define IS_SERPINTINE true
|
||||
#define TIME_ANIMATION 1000 // ms
|
||||
|
||||
// CRGB leds[NUM_LEDS];
|
||||
|
||||
LedsXY<WIDTH, HEIGHT> leds;
|
||||
XYMap xyMap(WIDTH, HEIGHT, IS_SERPINTINE);
|
||||
UITitle title("Simple control of an xy path");
|
||||
|
|
@ -49,31 +51,21 @@ UISlider offset("Offset", 0.0f, 0.0f, 1.0f, 0.01f);
|
|||
UISlider steps("Steps", 100.0f, 1.0f, 200.0f, 1.0f);
|
||||
UISlider length("Length", 1.0f, 0.0f, 1.0f, 0.01f);
|
||||
|
||||
|
||||
XYPathPtr heartPath = XYPath::NewHeartPath(WIDTH, HEIGHT);
|
||||
|
||||
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
auto screenmap = xyMap.toScreenMap();
|
||||
screenmap.setDiameter(.2);
|
||||
FastLED.addLeds<NEOPIXEL, 2>(leds, NUM_LEDS).setScreenMap(screenmap);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void loop() {
|
||||
fl::clear(leds);
|
||||
|
||||
// FASTLED_ASSERT(false, "This is a test");
|
||||
|
||||
// leds(x,y) = CRGB(255, 0, 0);
|
||||
float from = offset;
|
||||
float to = length.value() + offset.value();
|
||||
|
||||
heartPath->drawColor(CRGB(255, 0, 0), from, to, &leds, steps.as_int());
|
||||
|
||||
|
||||
FastLED.show();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
/*
|
||||
This demo is best viewed using the FastLED compiler.
|
||||
|
||||
Windows/MacOS binaries: https://github.com/FastLED/FastLED/releases
|
||||
|
||||
Python
|
||||
|
||||
Install: pip install fastled
|
||||
Run: fastled <this sketch directory>
|
||||
This will compile and preview the sketch in the browser, and enable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue