IoT Clock: Difference between revisions

From SGMK-SSAM-WIKI
Jump to navigation Jump to search
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Look Obama, I made a clock.'''
'''Look Obama, I made a clock.'''
[[File:iot_clock_1.jpg|400px]]
== Project on Hackaday ==
https://hackaday.io/project/8645-iot-clock


== BOM ==
== BOM ==
Line 5: Line 12:
* Particle Photon
* Particle Photon
* Adafruit neoPixel Ring 60 Pixels
* Adafruit neoPixel Ring 60 Pixels
 
* Some leftover MDF and Plexiglass
* Hotglue


== Code ==  
== Code ==  
Hacky and stuff... but working.
Hacky and stuff... but working.


=== Firmware ===
https://gist.github.com/morgulbrut/ed29a2c7a000f6117db1
https://gist.github.com/morgulbrut/ed29a2c7a000f6117db1


=== Webapp ===
https://github.com/morgulbrut/iot-clock-webapp


== Settings ==  
== Settings ==  
Some parameter could be set trough webrequests.
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=2
=== Hour marks on/off ===


On:
There is a webapp to do this now. So no need for curl anymore:


  curl https://api.particle.io/v1/devices/43002e001147343339383037/setHMarks -d access_token=68ac7f91a8d33a696ad5d84d7f3d7d6c104c87d3 -d params=1
https://iot-clock2.appspot.com/


Off:


  curl https://api.particle.io/v1/devices/43002e001147343339383037/setHMarks -d access_token=68ac7f91a8d33a696ad5d84d7f3d7d6c104c87d3 -d params=0
== Modes ==


== TODO ==
{| 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
|} 


* clean up code.
*Second hand jumps not every second
* defining a useful API.
**Second hand moves trough a rainbow during one minute

Latest revision as of 16:04, 27 March 2019

Look Obama, I made a clock.

Project on Hackaday

https://hackaday.io/project/8645-iot-clock


BOM

  • Particle Photon
  • Adafruit neoPixel Ring 60 Pixels
  • Some leftover MDF and Plexiglass
  • Hotglue

Code

Hacky and stuff... but working.

Firmware

https://gist.github.com/morgulbrut/ed29a2c7a000f6117db1

Webapp

https://github.com/morgulbrut/iot-clock-webapp

Settings

There is a webapp to do this now. So no need for curl anymore:

https://iot-clock2.appspot.com/


Modes

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