Final Project

NeoPixel Animation and Positioning Library
I’m not building an animation library - i’m building a dashboard visualizer and planner, which will then output NeoPixel library code according to the light sequence you’ve created through the Web Dashboard.
It is library built on top of NeoPixel C++ library or a feature that generates code to copy paste into your original Arduino IDE C++ sketch.
Why
An interesting outcome is users being able customize their NeoPixels colors and animation from network (alternative Conn Dev project?).
Architecture & Settings
Open Source Tiny tool → web tool? Library? API call?
→ using Browser Native Canvas API only + Vanilla JS / CSS / HTML. No libraries.
→ Lightweight to be processed on a microcontroller web server. Very simple, even for web browser. • ↓ Responsive by nature.
Vanilla CSS → Storybook to prototype components.
Get Started: User action 1
Web UI — import NeoPixel type with scaled size to dot, fetch, adjust dependency, docs → pts
Positioning Flow: User action 2
â‘ Open canvas
To start
- Select canvas dimensions (screenshot Motion)
- Button: [Â Start positioning ]
- Click on canvas to position NeoPixel LEDs.
- NeoPixel LED: One point or circle on the canvas that can change colors.
- Button: [End positioning / finish arranging]
Options while feature is open for changes (dashboard)
- Drag to move existing NeoPixel LEDs.
Start sequence / animations: user action 3
② Button: [ “Start Animation Pattern Sequence” ] • Click on each NeoPixel LED. The order with which you click is what determines the order in which they
Button: [ “End Animation Pattern Sequence” ]
Have set model patterns too.
Pull from Adafruit.
Options while feature is open for changes (dashboard)
Toggles:
- Size
- Color
- Brightness (select groups can have different brightness)
- Speed
- ms lenght of interval
? Different colors between LEDs and very smooth hue transitions
V2:
- NeoPixel type (?) V2
Last step: Export Code / Library Function to be pasted and tested directly within
• Expert code or library function
User actions always available (especially during editing animation)
③ “RUN” the play animation.
→ Auto save values each time. To browser cache?
Exporting animation: Final step
Goal: Take this UI → expose to user via network == Access point.
③ Button: [ Process Arduino C++ code with AdafruitNeoPixel library ]
Button: [ Export Arduino code in full to test right away ]
Button: [ Copy components Arduino code in full to test right away ]
Version 2
- Add a video to see what that would look like. [Â Kezia ]
- Fabri UI drag and drop tool for TFT Interfaces.
Dan’s comments
For Open Source:
- Contributing.MD to add features such as NeoPixel datasheet integration.
Notes
Guidelines
- Well documented bug report
- (API) Bluesky bot
- Open Source Dataset : if you’re crowdsourcing the data
- CSV or Json file
- Kaggle
NeoPixel Light animation library?
Next week - April 20: come prepared to present what you want it to be. Proposal - show a readme or GitHub filed issue.
UV - new python tool that handles venvs
Uv add library_name
Uv run loads the env
To have people contribute to the source code OR modify and run locally ——-> github repo, issues, PR, forking or cloning, license all that jazz
To have people use it as a tool ——-> web like it is now!
To have people use certain functions or components in their code ———> library with exposed parameters for each component. Everything that can vary gets “exposed”. Then you publish somewhere.
To publish through a package manager: npm or homebrew (MacOS only I think) are the typical options!
Or through CDN - import <script> tag
Arduino IDE vs CircuitPython
What does the file structure for python look like? Is it separate components in different files?
If you’re looking for excuses to go back to C++:
- Arduino IDE case: you can import files on Arduino like we import Arduino_secrets_passwords.h. With .h extension files are hidden. Without they’re just a tab on your IDE.
- Code Editor like VS Code: you’d use Platform.io to run the code directly, view serial monitor ect. :) With imported files - voilá - just as easy as typical coding.
Which!!!!! - i’m so glad we’re talking bc i’ve been having same issue. Like code too long, I wanna cry.
And i’ve been creating entirely separate files for component and experiment i’m running before adding to main sketch.
THANK YOU FOR REMINDER aaaah
———
If you’re open sourcing an Arduino Library, also possible to bundle it as a library that lives on your computer and then u see its source code / import file like described above.
Or make it available on the cloud / Arduino Library Manager for other developers.
NeoPixel / WLED resources in thesis context
debounce
NeoPixel Hardware / Power advice
Be extremely cautious with bench power supplies.
- Some — even reputable, well-regarded brands — can produce a large voltage spike when initially switched on, instantly destroying your NeoPixels! If you use a bench supply, do not connect NeoPixels directly. Turn on the power supply first, let the voltage stabilize, then connect the pixels (GND first).
- Adding a 300 to 500 Ohm resistor between your microcontroller's data pin and the data input on the first NeoPixel can help prevent voltage spikes that might otherwise damage your first pixel. Please add one between your micro and NeoPixels!
- ALWAYS CONNECT GROUND (–) BEFORE ANYTHING ELSE. Disconnect ground last too.
Power calculations
Each NeoPixel in a circuit may draw up to 60 milliamps of current. It’s a maximum worst case scenario, used in planning wire gauges and battery current and capacity. 100 NeoPixels? 60 × 100 = 6,000 milliamps. Six Amps. That’s considerable.
Typical NeoPixel size (max draw: 60mA per LED)
RGBW (max draw: 80mA per LED)
SK6805 LEDs (NeoPixel BFF Add on)
# of NeoPixels | Max draw | milliamps | Amps |
25 | 49 (SK6805) | 1225 | 1.2 |
7 | 60 (Reg) | 420 | 0.42 |
Current LiPo in use for the whole circuit: 1500mAh / 1.5A
Static power consumption 1Amp
26 AWG silicone-jacketed is fine….
Moderate calculations
- Start with max draw for that particular size of NeoPixel
- Adjust for 3.7V instead of 5V
- Adjust estimation to account for animations: reduce mA to 1/3 of maximum draw
- Adjust for level of brightness
When mixing colors and displaying animations, the current draw will be much less. It’s impossible to estimate a single number for all circumstances, but we’ve been using 1/3 this (20 mA per pixel) as a gross rule of thumb with no ill effects. But if you know for a fact that you need every pixel on at maximum brightness, use the full 60 mA figure.

