Comments (17)
I don't actually know how I would control WS2812B's in that kind of setup. The AVR setup currently supported is with a 32u2. I would recommend the steps you take are trying to find some way to control the WS2812B LEDs from your PC-side by some means, then work form there? If you can have example code that can set the colors, I can help you to write a ColorChord driver.
from colorchord.
I got that going in Arduino Scatch, not a big deal to implement that in pure C. Got some work to do but Ill take care of that. Ill get back to you when Im done. Thanks for the help.
from colorchord.
no no the C would have to be on the PC-side. You may do what you wish on the Arduino side.
from colorchord.
Hey Charles, sry for not getting back to you earlier, exams inc ...
I thought the easiest way would be to make the 328p react like your 32u2. I got that running using a Library to control the LEDs called FastLED and am confident that thats possible in Arduino Scetch eventhough I wrote it in C++. Now Colorchord would just have to push the bytestream to the 328p. As far as I know the 328p does not have native USB support, it just offers serial connection, didnt have time to check that yet though. So ill take a look on that and how you implemented that, maybe I can get that to work. Then it would be quite easy for newcomers to get that to work, just upload the Arduino Scetch to the chip, set up the LED count and configure Colorchord accordingly.
Could you explain how the Data you send to the 32u2 looks like? That would help a lot.
Will propably also take a look at your UDP Socket for controlling Asus Aura and similars, at least in Windows there are some possibilities. And Im working on a voronoi in high resolution with GPU usage but thats still a long way to go.
Ill get back to you if I need further help or got news.
from colorchord.
I use the native USB in the 32u2 to send it data. Conveniently I did a video on it. https://www.youtube.com/watch?v=Y5ldIov4JmM
I do recommend looking at USB as well to get a feel for how these things go together.
Regardless, I would first write a test program in windows, using system calls and stuff to output to your device before attempting to integrate it with colorchord. Once you do get it working, integration should be relatively painless.
from colorchord.
Ok thanks, Ill take a closer look if USB is an option and find a solution otherwise.
Can you explain to me, how to I have to configure the UDP Socket to get it up and running? didnt figure it out myself yet. Would be a nice help, if I didnt have to work that out. 👍
PS: nvm got it
from colorchord.
Let me know how all that experimentation goes.
from colorchord.
Could you contact me via email? My exams are about done, just one left that doenst bother me too hard. Id like to get this done soon. My mail is [email protected].
Im working on a C implementation for the arduino so you can get native support for it in colorchord. For everything else I need a dedicated service, that Ill put on git under GPL.
It would be really handy, if it was possible to get the raw color parts on the sockets, not mapped on an array with fixed size.
Could you explain to me, how the Output Drivers work so I can work on my own driver?
Thank you very much.
from colorchord.
I want to leave everything I can on github so others can see it when searching.
You cannot run ColorChord on an AVR in C. It just doesn't have the horsepower. You would need to run it on an ESP8266, minimum. Conveniently, there is already an embedded 8266 driver :).
The idea behind the Output Drivers is they handle taking noes, frequencies and intensities and translating them into LED values for a fixed number of LEDs, in a grid, strip, pie, etc.
You probably want the display drivers, which take this list of LEDs, "OutLEDs" (It's a global variable) and send them to a given piece of hardware.
from colorchord.
I understand that, would have posted the solution anyways but Im fine with this.
You got me wrong, Im not trying to port it on an arduino, surely that wouldnt work. But a lot of folks play with RGB Strips with WS2812Bs or similar with an arduino, as thats a cheap way to get into it. It would be really cool, if you could run colorchord on your pc and send the LED data to the arduino to put it on the leds. The difference to your solution is, that the atmega 328p just has serial connection, no USB.
So Im working on a solution to get the data across this very slow very old interface and am running into issues with either bandwith or controller speed bottlenecks. :D
Havent wasted a lot of time so far, so Im still good to go. If it works out, you get a pull request with another display driver that pushes the data to the serial connection and a Script to push on the atmega 328p and some docs.
I got a native USB speaking controller aswell, would like to test your code with that but I cant find the script, you compiled onto the controller. That would help a lot, maybe would even fix some of the issues I have with the 328p, if ported successfully (shouldnt be too hard).
from colorchord.
gotcha
from colorchord.
Found your USB project, its in another repo, you should add a link to that in the readme.md. ;)
Didnt take a porting approach yet though.
Got the 328p kinda working and kinda not, the connection is very limiting, but its possible to get it to work. You just have to push the bytestream to the serial interface and map them in the arduino to the leds. The connections limits to about 30 bytes per refresh and on my rig, colorchord pushes about 62 to 64 times into the UDP Socket, that I used as source. So you can run Linear for up to 10 LEDs or prominent for more as long as the controller manages to write the same data in all the registers fast enough. Couldnt really test that properly as my LED strips seem to be damaged. Might test that, after fixing them. I set up a 32u4 with the same code and that works flawlessly. Here is a clip of my rig with Linear Output on all LEDs. The flickering is not the code but the LEDs and the color mapping doesnt really work out either because of weird wiring to get it to work, its quite messed up but it still looks nice. :) https://youtu.be/l96tH0AEt44
Your solution for the 32u2 is really cool but not valuable for the 328p as the controller is fine, the connection is the issue. You might be able to adress this with some basic compression but I dont know how well that would work out. I propably wont follow on on the 328p anymore as it cant serve, what I aim at. I can give you the Scetch for the 328p if you want to add support yourself. I had some issues with Serial Port C libraries in Win10 and figured you would propably prefer a direct implementation anyways, so I swapped to python for testing purposes.
I'll keep working on a native solution for other arduinos, though maybe depending on a second process connecting to colorchord through the socket as Id like to add some other features like the high res voronoi with GPU rendering, support for Asus Aura and other RGB systems and a bigger support for DMX interfaces. This will, as far as I can tell for now, eventually also support the 328p up to the bottleneck issues I experienced.
from colorchord.
Hey, 2 questions for further development: Is there a raw outdriver or could you add one please?
Just put the colors and their relative values out, so I can send them to the socket and reuse them anywhere else.
And what DMX device are you using? I wanna play around with that as pointed out and would prefer a fast solution for now.
from colorchord.
I think I'm using something custom I made a long time ago for the DMX device.
There is sort of a raw output device, but it only works on Linux, and it uses shared memory... There is a sort of led-output driver, which output colors, and that is the "Net" output driver.
from colorchord.
Ok thanks. I'll work on another solution for dmx but this is postponed for now as I need to figure out the best solution for me first.
I couldnt find the shared memory device, but that isnt such a big issue as Id like to use Windows aswell. I didnt find the net output either, do you mean the DisplayNetwork, the UDP Client?
That is depending on the output driver and the amount of leds, that helps for driving my led strip but is not raw data, as Id like to use it.
Could you help me write another output driver with documenting the ressources, you used to store this information and how to get them?
from colorchord.
Never postpone anything to find the best solution. Start down doing solutions. You won't know the best solution until you get there.
I mean DisplayNetwork. It should be able to spew out UDP packets anywhere you want with the color info. The first few bytes of the packet are 0, but, the rest of the packet is just the RGBRGBRGB values of all the LEDs.
from colorchord.
Quite a time a go but I got some updates. Actually I got more like an alpha of a working software.
A friend of mine and me forked the project and got it running. Yeah DisplayNetwork can output to a UDP Socket and we use that now. Was looking for the real raw data like 12% yellow, 23% red, ...
The serial connection to most arduinos were bottlenecking at over 200 leds if you sent individual colors (Linear or Voronoi need that) but we implemented a Run Length Encoding and now that seems to work like a charm. Should work with any AVR flashable with Arduino IDE or platformio and Support for FastLED.
We are still changing some QoL things and figure out bugs but looks decent to me so far. It should be platform indipendent, our own software was developed in python to enable this.
DMX and stuff like Asus Aura is still WIP.
Check it out at github.com/ragebone/Colorchord
from colorchord.
Related Issues (20)
- Attempting to port to Arduino-ESP32 - how to pass audio data and output with FastLED HOT 6
- Memory leak on Win10? HOT 4
- Deal with sound popping/winmm issues.
- I'm Noob need help HOT 6
- Spelling Error in Config Option HOT 1
- Question: New version does not work in Wallpaper engine HOT 2
- Application doesn't run in headless mode HOT 4
- First LED in the led strip doesn't get recognize at all HOT 3
- how to write a new display output driver? HOT 1
- OpenRGB and/or E1.31 output support? HOT 6
- Voronoi Bugs HOT 1
- CFNA Drivers Not Found HOT 1
- The "off" state of the LEDs are red using OutputLinear via wled udp HOT 9
- Issue locationg USB Port for Embedded esp8266 HOT 12
- Missing image.elf and image.elf-0x10000.bin HOT 10
- Default configuration doesn't work on Windows out of the box HOT 1
- Question: cpu_autolimit and interval not working on some displays HOT 1
- Question building for / flashing ESP8266 HOT 18
- Linear Output with is_loop has Poor Performance
- Base frequency recalculation doesn't reflect custom base_hz value
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from colorchord.