Replies: 10 comments 8 replies
-
Sounds amazing! Also sounds like it will break compatibility with the Arduino IDE? I'd love to see what this looks like in a branch in your fork. As long as it's kept in a branch, and most changes are still made in main and then merged into the other branches it sounds fine to me. |
Beta Was this translation helpful? Give feedback.
-
Jason, could you do me a favor?
Why? I need to work through the list of dependencies ... the README.md doesn't list them all, and this is the lowest-overhead way I could think of to get the list that you use when building. |
Beta Was this translation helpful? Give feedback.
-
9 out of 9 branches have been combinedBranches to be combined
For early review / tracking completion
List of dependencies
With the following libraries, compiles in Arduino IDE:
(1) The IR library is not used by Fib256. However, some boards enable people to add an IR, so want to list the version of this library that would be used. (2) NOT currently used, but a potential future library. The Compositional Numeric Library provides the ability to perform fixed-precision math. This may be helpful for boards that lack hardware floating point acceleration (e.g., ESP8266, AVR, QT Py). Even ESP32 only has hardware acceleration for floating point multiplication, so effects heavy on floating-point division also has potential improvements. CNL 1.x works with C++11. However, the normal distribution requires |
Beta Was this translation helpful? Give feedback.
-
@jasoncoon -- Could you help me by answering a few questions? I'll try to make most of them simple yes/no or multiple-choice. :) (expand) Seven simple + one additional question
(expand) Foundation: How the arrays in map.h are created
It appears that all the boards were generated using the standard vogel model. That is, the first pixel is at the origin (pre-transform). One alternative is to offset the first pixel by a fixed amount, such as when desiring to enforce a minimum spacing requirement between pixels. However, this offsetting does not appear to have been done, as the first element of Because the process transforms the positions, we can begin using unit values, simplifying the equations slightly.
// first, translate from origin == center so left side and bottom aligned with X/Y axis
double shiftX := min(originalCoordinatesX[]);
double shiftY := min(originalCoordinatesY[]);
double translatedX[] <== originalCoordinatesX[] - shiftX; // shifts right to align left side with X=0
double translatedY[] = originalCoordinatesY[] - shiftY; // shifts upward to align bottom with Y=0
// next, scale so that values lie entirely within the range [ 0.0 ... 256.0 ]
double maxXY = max(max(translatedX[]), max(translatedY[]);
double scaleFactor = 256.0 / maxXY;
double scaledX[] = translatedX[] * scaleFactor;
double scaledY[] = translatedY[] * scaleFactor;
// finally, convert to integer values in the range [ 0 ... 255 ]
uint8_t coordsX[] = (uint8_t)(scaledX[] - 0.5); // subtract 0.5 to avoid bias
uint8_t coordsY[] = (uint8_t)(scaledY[] - 0.5); // subtract 0.5 to avoid bias Thanks! |
Beta Was this translation helpful? Give feedback.
-
I'm just doing some cleanup, and I need your help understanding what the right fixes are. This all relates to the data in IMPORTANT -- Review output as background to questions
I wrote some validation code, to help me validate my understanding of the existing 1628-rings code. The link goes to godbolt.org, which will compile and execute that validation code and show the console output ... all via the web (nothing local for you to do). The validation code also pre-calculates the values for esp8266-fastled-webserver/PolarNoise.h Lines 19 to 32 in e2103ea Those pre-calculated values are stored in Output SectionsI've added three blank lines between sections of output. The first section of output is from the validation of the ring structure. This validation ensures that the angle (in the The second section of output is from validation that, for each ring, the The third section of output notes that the values in Question 1 -- correct number of pixels per ring?
As you can see from the output (sections 1 & 2), it appears that there is a mismatch between the QUESTION 1Can you verify (on the actual physical board) how many pixels are supposed to be in ring indices 13..14?
I am presuming the answer is Question 2 -- Intentionally non-smooth polar function?
Recall that the code snipped pre-calculates esp8266-fastled-webserver/PolarNoise.h Lines 19 to 32 in e2103ea It appears that the value being computed for See the third section of the output from the godbolt.org snippet, specifically the Using the QUESTION 2:Can you confirm that, instead of calculating the
Question 3 -- Avoid calculating `y` in polar noise function?
Similar to the above, it's clear that the the calculations for the Similarly, the esp8266-fastled-webserver/PolarNoise.h Line 27 in e2103ea However, the calculations for y = ringIndex * (128 / ringCount);
y = ringIndex * (128 / 20);
y = ringIndex * 6; Therefore, Note that QUESTION 3:Can the calculation of OK, that's as simple as I could make the questions. Looking forward to hearing from you. |
Beta Was this translation helpful? Give feedback.
-
Well, I'm essentially done with the changes to move all the code into a single branch. Under Arduino, switching between "products" is a single-line change. I've put up draft PR #211. I will move it away from draft status after I do some testing (primarily using print statements, since I can't really test the boards I don't have). Even without hardware, running each "product" without anything attached would at least catch any obvious crashes. The rest of the changes really center around which defaults are used for each board. but ... it is a large set of changes, so I must ask: @jasoncoon -- is PR #211 already beyond what you'd consider approving as a PR? Admittedly, as with any PR, there are one-time costs for review and validation. At the same time, there are benefits, such as having a single branch for bug fixes, new effects, etc. Of course, the real benefits will flow from platformio support ... easier builds for any product, alternate MCU support including esp32, ability to use VSCode with proper code-completion and click-to-definition, etc. But, I want to ensure you have the Arduino-focused solution first, as you expressed concern about breaking compatibility with Arduino. Of course, I am open to other changes that you'd want to see in the layout of the files, questions, change requests, etc. |
Beta Was this translation helpful? Give feedback.
-
OK, most significant pre-requisite changes are now in main branch via PR #211. Now to work on PlatformIO, when real life doesn't intrude... |
Beta Was this translation helpful? Give feedback.
-
🎉 @jasoncoon ... It may have been easier than I thought, once all the prerequisite work was complete. 🎉 See PR #212, currently in draft status (generates and uploads both sketches and filesystem). How to use in VSCode
First build using PlatformIO in VSCode
That's it! You've now compiled all seven "products", and then built / uploaded both the binary and the associated file system for the default (no product) build environment. Other tips
By default, the bottom bar includes an indication of the current build environment. You can click this directly to change to a different build environment: Note, however, that the prompt will appear at the top of the screen for which environment you want to switch to: You can also access this entirely using the keyboard as follows:
Benefits include:
There's more, of course, but the above are some of the obvious benefits. Give it a try! Let me know what you think? |
Beta Was this translation helpful? Give feedback.
-
PlatformIO is now a supported option, although you can still build using Arduino. Woo-hoo! |
Beta Was this translation helpful? Give feedback.
-
I've been trying to spend a little spare time here and there trying to get ESP32 support working, but have not yet succeeded. Anyone else try? In particular, I would love to be able to get wi-fi setup over BLE working: https://www.improv-wifi.com Also spent a little time updating this project, and making sure it still works: https://github.com/jasoncoon/esp32-fastled-ble |
Beta Was this translation helpful? Give feedback.
-
This repository has many branches, and many of those are hardware-specific. At the same time, there is a substantial amount of common code.
It has been my experience that PlatformIO simplifies the following, both for the initial release and for anyone who wants to make changes:
While PlatformIO has some value for the creator (here's looking at you, Jason), it also has great value for purchasers. PlatformIO makes it REALLY easy to tinker, because all libraries and setup is handled by PlatformIO. No more wondering what library or version to get ... just pick a configuration and click "build".
It is my hope to combine at least the following branches, to allow building using PlatformIO for any of them via simple menu selection:
I would track which commit was the last one I merged into the PlatformIO branch.
@jasoncoon ... because this might be considered a "large" change, I wanted to check if this would be of interest. On the plus side, it'd be easier (single PR) to add effects to all these products at once vs current situation (either six PRs, or a PR + six merge / conflict resolutions).
If so, any thoughts before I start (such as other branches to include) would be most welcome.
Beta Was this translation helpful? Give feedback.
All reactions