appideasDOTcom / APPideasLights

Arduino and mobile app code for the APPideas Lights projects
19 stars 5 forks source link

Programmable patterns #12

Open appideasDOTcom opened 5 years ago

appideasDOTcom commented 5 years ago

There needs to be a way to set a pattern (e.g. changing colors, pulsing, strobe, etc.) on the phone/external device, send the pattern to the controller, and have it continue the pattern without network interactions from the phone/device.

appideasDOTcom commented 5 years ago

The beginnings of this feature have been committed into the features/patternLoops branch.

This is working at a basic level on the Arduino device. Currently, transitions are fade-in/fade-out between colors. Ideally, this would be a cross-dissolve instead.

This feature isn't terribly useful until the app can control it, but if you want to try it out, point a web browser to one of these examples:

Red-green-blue for 3 seconds each, and with a 1/3 second transition: http://(ip address of controller):5050/pattern?p=first&d=3000&t=333&c=[100,0,0,0],[0,100,0,0],[0,0,100,0]

Strobe effect on red: http://(ip address of controller):5050/pattern?p=first&d=100&t=0&c=[100,0,0,0],[0,0,0,0]

Red-green-blue-white strobe: http://(ip address of controller):5050/pattern?p=first&d=100&t=0&c=[100,0,0,0],[0,0,0,0],[0,100,0,0],[0,0,0,0],[0,0,100,0],[0,0,0,0],[0,0,0,100],[0,0,0,0]

Party mode! http://(ip address of controller):5050/pattern?p=first&d=100&t=0&c=[100,0,0,0],[0,100,0,0],[0,0,100,0],[0,0,0,100]

Also in this branch is a new endpoint of /multiset, which allows you to set all of the light values on a string at once (saving network requests). See issue #16
A request for purple is: http://(ip address of controller):5050/multiset?p=first&c=100,0,100,0