IoT Clock: Difference between revisions
Jump to navigation
Jump to search
| Line 14: | Line 14: | ||
== Settings == | == Settings == | ||
{| class="wikitable" | |||
|- | |||
! Modes || 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10 || 11 || 12 || 13 || 14 || 15 || 16 | |||
|- | |||
| Binary || 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0 || 1 | |||
|- | |||
| Reverse || 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0 || 1 || 1 || 1 || 1 || 1 || 1 || 1 || 1 || X | |||
|- | |||
| Trail || 0 || 0 || 0 || 0 || 1 || 1 || 1 || 1 || 0 || 0 || 0 || 0 || 1 || 1 || 1 || 1 || X | |||
|- | |||
| random Secs * || 0 || 0 || 1 || 1 || 0 || 0 || 1 || 1 || 0 || 0 || 1 || 1 || 0 || 0 || 1 || 1 || X | |||
|- | |||
| rainbow Secs ** || 0 || 1 || 0 || 1 || 0 || 1 || 0 || 1 || 0 || 1 || 0 || 1 || 0 || 1 || 0 || 1 || X | |||
|} | |||
*Second hand jumps not every second | |||
**Second hand moves trough a rainbow during one minute | |||
Some curl examples: | Some curl examples: | ||
| Line 23: | Line 41: | ||
=== Binary clock === | === Binary clock === | ||
curl https://api.particle.io/v1/devices/43002e001147343339383037/setHaTrails -d access_token=68ac7f91a8d33a696ad5d84d7f3d7d6c104c87d3 -d params= | curl https://api.particle.io/v1/devices/43002e001147343339383037/setHaTrails -d access_token=68ac7f91a8d33a696ad5d84d7f3d7d6c104c87d3 -d params=16 | ||
== TODO == | == TODO == | ||
Revision as of 19:01, 22 November 2015
Look Obama, I made a clock.
BOM
- Particle Photon
- Adafruit neoPixel Ring 60 Pixels
Code
Hacky and stuff... but working.
https://gist.github.com/morgulbrut/ed29a2c7a000f6117db1
Settings
| Modes | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Binary | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| Reverse | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | X |
| Trail | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | X |
| random Secs * | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | X |
| rainbow Secs ** | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | X |
*Second hand jumps not every second **Second hand moves trough a rainbow during one minute
Some curl examples:
Normal clock
curl https://api.particle.io/v1/devices/43002e001147343339383037/setHaTrails -d access_token=68ac7f91a8d33a696ad5d84d7f3d7d6c104c87d3 -d params=0
Binary clock
curl https://api.particle.io/v1/devices/43002e001147343339383037/setHaTrails -d access_token=68ac7f91a8d33a696ad5d84d7f3d7d6c104c87d3 -d params=16
TODO
- clean up code.
- defining a useful API.