Streaming Data

Suppose I wanted to control an RGB led with the Imp, using sliders for control. It is important to my application that the RGB levels change as the sliders are being moved, in real time (the normal imp latency is okay). Is this possible?

When you say sliders, what are you referring to? An HTML control, or a smartphone control or something else? With any control sent over HTTP, “real-time” is essentially as fast as you can get requests to the device. I wouldn’t recommend flooding the agent with requests however. For example, the slider controls in my “Pitchfork” iOS app sends a value between 0.0 and 1.0 in 0.1 increments when the user releases the control. (This is called “Touch Up Inside”). You can set the slider to send on every incremental change, and this might work on a small resolution like 10, but not on something like 256. I am on the east coast, and my experience with response times from the agent or device has been very fast, but you can overload it. If you only intend to change between 3 color states, I would think you could get a pretty quick response.

Specifically my sliders are in an Android app, with 0-100 values. I’m not overly familiar with http, but I did try an http post request with every incremental change. Not surprisingly, it didn’t work well. So I’m wondering if it’s possible to accomplish the task with an open connection or something.

Someone had the same issue and it sounded like the Agent gets overloaded with requests. The only way I’ve seen this done in other systems is via web sockets. Sockets have been mentioned but I don’t know where on the e.imp wish list?