Has anyone done any work with FastLED on a connected Micro,

Has anyone done any work with FastLED on a connected Micro, using TCP or UDP to control it? I’d like to setup a Photon with some sort of handler that allows me to set a program, color, or brightness in close to real time using UDP messaging (think Hue control like). The Photon should do this very neatly.

I know I can do this, pry a bunch of interesting ways. The question is, what have others done, and what issues were solved? Would openpixelcontrol work for this? Are there other LED control protocols (especially lightweight ones for use with a micro and UDP)? Should I just hack up some simple UDP protocol and do it that way? The Particle.io REST interface isn’t a good choice, too slow, and I just started looking into OPC. This will all be local network driven via WiFi, so I’m curious to know what others have done and how they figured it all out.

I have been working with FastLED and the Particle boards (Core and Photon) quite a bit lately. So far I’ve been exclusively using their cloud functions and variables, and have been able to do quite a bit (adjust brightness, choose pattern, change pattern parameters, etc). Here’s an example of one of my projects (firmware and web app): https://github.com/evilgeniuslabs/tree

I’m getting ready to try out their TCPServer, so that I can handle more rapid tasks, such as interactive drawing. I’ll let you know how it goes, and will be watching here to see if you or someone else beats me to it. :slight_smile:

Would it make sense to describe a simple text protocol to use? I use REST for a lot of projects, but it’s too slow. the TCPServer option is what I’ve coded up today while I wait for OpenEmbedded to build a platform.

But if we collaborate, describe a simple to implement protocol, then it might be of use to others along with examples. Just a thought. I should have mine tested before too long, but I doubt my protocol is the best.

https://github.com/buelowp/intelligentlightstripr

Note the readme format is terrible, but I should be able to fix that shortly.

Your format looks like a nice simple start. OPC would also work, could just define a new system ID and commands.

https://plus.google.com/+KasperKamperman/posts/gsY84zrSc2f

If you want to control things. Otherwise something like OPC or OSC can be nice. JSON might also be nice.

I like your protocol Kasper, but it lacks some of the capabilities I want to have. Looking at it, I can see how to extend it for some things, but have you done work on it to extend this at all? For instance, can I send one 12 byte color command for a range of pixels? I don’t see how you would exactly, but I would profess that I just started looking at it, so I may just not get it right away.

How exactly do you expect gradient to work? This protocol doesn’t imply anything about how to make it work with FastLED.

Also, any thought to a query command, so that one could ask the device how many connected strips/strings/etc and how many leds per connected strip? I use strip loosely, I know it’s more complicated than that.

I like it, and would like to run with it over mine (which is a bit more cumbersome to implement, but you can read it and test it with telnet which is nice).

It is really something that I put online as a starting point. I use it for my own installations with specific functions.

I really didn’t design it specifically for FastLED, since most people here have their own demands on what they want to control. Feel free to use it.

I’ve been waiting for a while for support to be added to the Photon boards and have been away from the FastLED group here in that time so it’s good to see the first post mention the Photon, can you confirm it’s working? Cheers

I can recommend the OSC protocol for sending the data over UDP, it’s also compatible with many existing applications for all kinds of platforms.
I’ve had plans for making such an LED controller for some years by now, but have been waiting for, first the spark core to be supported, then realised I needed more ram, and then waited for the Photon to be supported, but now I rarely got time for my good old hobby… so sad :frowning: haha
But I really like what you guys have come up with, and I think the chrome app will be really awesome with fast UDP, instead of the slow cloud. It will definitively add a whole lot of responsiveness = fun!! I think nothing is cooler than playing with all kinds of parameters in real time.
I think they have OSC working with the Photon by now.

I also got ArtNet working for the SparkCore for streaming pixels, back then, but I remember someone from here mentioning OPC is better?

I’m not familiar with OSC, but I don’t see OPC via the Photon libraries on their web IDE. Can you somehow use OSC to control pixels?

Also, @Adam_Groves , it is. I can’t find the forum post for it, but you can find the github repository here.

I think it’s a bit behind master, but it works for me for now. I also tend not to use it with their web IDE, it still is a problem for more complicated projects, so I can’t help you find it there. However, Eclipse works great when you get it setup, and I do all my development there now, and curl to do firmware uploads to devices.

I don’t think the original OSC protocol is optimised for streaming many pixels, because it send with a “large” header witch needs to be parsed too. So you end up with allot clock cycles waisted on parsing the command.
But you can just modify it to send all kind of data you need.
Have you looked in to ArtNet?

I was about to go on about why ArtNet wouldn’t work for me, but then I found the ArtNet library for a Teensy and I think I might use it. Hadn’t done much digging into it yet, but maybe it’s a good way to get this done.

I still like the idea of being able to type the protocol into telnet to make things work, but I would rather do something that other people can use as well. I need to figure out how to easily send ArtNet messages though. Sending text is easy from your phone/laptop. But I may have to build a custom app to talk to my device for ArtNet.

Lots to think about. Can’t really get further into this with the holidays coming up and my Neopixel window lights having to be fixed.

if you just want to set a single pixel at a time, OSC might be the way to go, you can type in OSC messages from telnet as well. The format could be something like “/1/(number of the pixel you want to set)/(the colour )”