├── 3D enclosure
├── LICENSE.txt
├── README.txt
├── attribution_card.html
├── files
│ ├── couvercle_horloge.STL
│ ├── tronçon_base.STL
│ └── tronçon_horloge.STL
└── images
│ ├── 22dce6c2f3b7f5bc79e17c8bd498e20f_preview_featured.jpg
│ ├── 37e0972399dbdf9ed80ed566ae9276be_preview_featured.jpg
│ ├── 5bc9c06891f443d6b0ef26026fb2811c_preview_featured.jpg
│ ├── 6d6008072107c3be835fff005facc976_preview_featured.jpg
│ ├── c4b5dcd4da751cd00d1ae3eba0c92fd1_preview_featured.jpg
│ └── c7da2202001ef3739c67954b4c9dbb31_preview_featured.jpg
├── LICENSE.md
├── README.md
└── neopixelringclock60
└── neopixelringclock60.ino
/3D enclosure/LICENSE.txt:
--------------------------------------------------------------------------------
1 | neopixel clock (https://www.thingiverse.com/thing:2415199) by arradan is licensed under the Creative Commons - Public Domain Dedication license.
2 | http://creativecommons.org/publicdomain/zero/1.0/
3 |
4 | Creative Commons Legal Code
5 |
6 | CC0 1.0 Universal
7 |
8 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
9 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
10 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
11 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
12 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
13 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
14 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
15 | HEREUNDER.
16 |
17 | Statement of Purpose
18 |
19 | The laws of most jurisdictions throughout the world automatically confer
20 | exclusive Copyright and Related Rights (defined below) upon the creator
21 | and subsequent owner(s) (each and all, an "owner") of an original work of
22 | authorship and/or a database (each, a "Work").
23 |
24 | Certain owners wish to permanently relinquish those rights to a Work for
25 | the purpose of contributing to a commons of creative, cultural and
26 | scientific works ("Commons") that the public can reliably and without fear
27 | of later claims of infringement build upon, modify, incorporate in other
28 | works, reuse and redistribute as freely as possible in any form whatsoever
29 | and for any purposes, including without limitation commercial purposes.
30 | These owners may contribute to the Commons to promote the ideal of a free
31 | culture and the further production of creative, cultural and scientific
32 | works, or to gain reputation or greater distribution for their Work in
33 | part through the use and efforts of others.
34 |
35 | For these and/or other purposes and motivations, and without any
36 | expectation of additional consideration or compensation, the person
37 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she
38 | is an owner of Copyright and Related Rights in the Work, voluntarily
39 | elects to apply CC0 to the Work and publicly distribute the Work under its
40 | terms, with knowledge of his or her Copyright and Related Rights in the
41 | Work and the meaning and intended legal effect of CC0 on those rights.
42 |
43 | 1. Copyright and Related Rights. A Work made available under CC0 may be
44 | protected by copyright and related or neighboring rights ("Copyright and
45 | Related Rights"). Copyright and Related Rights include, but are not
46 | limited to, the following:
47 |
48 | i. the right to reproduce, adapt, distribute, perform, display,
49 | communicate, and translate a Work;
50 | ii. moral rights retained by the original author(s) and/or performer(s);
51 | iii. publicity and privacy rights pertaining to a person's image or
52 | likeness depicted in a Work;
53 | iv. rights protecting against unfair competition in regards to a Work,
54 | subject to the limitations in paragraph 4(a), below;
55 | v. rights protecting the extraction, dissemination, use and reuse of data
56 | in a Work;
57 | vi. database rights (such as those arising under Directive 96/9/EC of the
58 | European Parliament and of the Council of 11 March 1996 on the legal
59 | protection of databases, and under any national implementation
60 | thereof, including any amended or successor version of such
61 | directive); and
62 | vii. other similar, equivalent or corresponding rights throughout the
63 | world based on applicable law or treaty, and any national
64 | implementations thereof.
65 |
66 | 2. Waiver. To the greatest extent permitted by, but not in contravention
67 | of, applicable law, Affirmer hereby overtly, fully, permanently,
68 | irrevocably and unconditionally waives, abandons, and surrenders all of
69 | Affirmer's Copyright and Related Rights and associated claims and causes
70 | of action, whether now known or unknown (including existing as well as
71 | future claims and causes of action), in the Work (i) in all territories
72 | worldwide, (ii) for the maximum duration provided by applicable law or
73 | treaty (including future time extensions), (iii) in any current or future
74 | medium and for any number of copies, and (iv) for any purpose whatsoever,
75 | including without limitation commercial, advertising or promotional
76 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
77 | member of the public at large and to the detriment of Affirmer's heirs and
78 | successors, fully intending that such Waiver shall not be subject to
79 | revocation, rescission, cancellation, termination, or any other legal or
80 | equitable action to disrupt the quiet enjoyment of the Work by the public
81 | as contemplated by Affirmer's express Statement of Purpose.
82 |
83 | 3. Public License Fallback. Should any part of the Waiver for any reason
84 | be judged legally invalid or ineffective under applicable law, then the
85 | Waiver shall be preserved to the maximum extent permitted taking into
86 | account Affirmer's express Statement of Purpose. In addition, to the
87 | extent the Waiver is so judged Affirmer hereby grants to each affected
88 | person a royalty-free, non transferable, non sublicensable, non exclusive,
89 | irrevocable and unconditional license to exercise Affirmer's Copyright and
90 | Related Rights in the Work (i) in all territories worldwide, (ii) for the
91 | maximum duration provided by applicable law or treaty (including future
92 | time extensions), (iii) in any current or future medium and for any number
93 | of copies, and (iv) for any purpose whatsoever, including without
94 | limitation commercial, advertising or promotional purposes (the
95 | "License"). The License shall be deemed effective as of the date CC0 was
96 | applied by Affirmer to the Work. Should any part of the License for any
97 | reason be judged legally invalid or ineffective under applicable law, such
98 | partial invalidity or ineffectiveness shall not invalidate the remainder
99 | of the License, and in such case Affirmer hereby affirms that he or she
100 | will not (i) exercise any of his or her remaining Copyright and Related
101 | Rights in the Work or (ii) assert any associated claims and causes of
102 | action with respect to the Work, in either case contrary to Affirmer's
103 | express Statement of Purpose.
104 |
105 | 4. Limitations and Disclaimers.
106 |
107 | a. No trademark or patent rights held by Affirmer are waived, abandoned,
108 | surrendered, licensed or otherwise affected by this document.
109 | b. Affirmer offers the Work as-is and makes no representations or
110 | warranties of any kind concerning the Work, express, implied,
111 | statutory or otherwise, including without limitation warranties of
112 | title, merchantability, fitness for a particular purpose, non
113 | infringement, or the absence of latent or other defects, accuracy, or
114 | the present or absence of errors, whether or not discoverable, all to
115 | the greatest extent permissible under applicable law.
116 | c. Affirmer disclaims responsibility for clearing rights of other persons
117 | that may apply to the Work or any use thereof, including without
118 | limitation any person's Copyright and Related Rights in the Work.
119 | Further, Affirmer disclaims responsibility for obtaining any necessary
120 | consents, permissions or other rights required for any use of the
121 | Work.
122 | d. Affirmer understands and acknowledges that Creative Commons is not a
123 | party to this document and has no duty or obligation with respect to
124 | this CC0 or use of the Work.
--------------------------------------------------------------------------------
/3D enclosure/README.txt:
--------------------------------------------------------------------------------
1 | .: :,
2 | ,:::::::: ::` ::: :::
3 | ,:::::::: ::` ::: :::
4 | .,,:::,,, ::`.:, ... .. .:, .:. ..`... ..` .. .:, .. :: .::, .:,`
5 | ,:: ::::::: ::, ::::::: `:::::::.,:: ::: ::: .:::::: ::::: :::::: .::::::
6 | ,:: :::::::: ::, :::::::: ::::::::.,:: ::: ::: :::,:::, ::::: ::::::, ::::::::
7 | ,:: ::: ::: ::, ::: :::`::. :::.,:: ::,`::`::: ::: ::: `::,` ::: :::
8 | ,:: ::. ::: ::, ::` :::.:: ::.,:: :::::: ::::::::: ::` :::::: :::::::::
9 | ,:: ::. ::: ::, ::` :::.:: ::.,:: .::::: ::::::::: ::` :::::::::::::::
10 | ,:: ::. ::: ::, ::` ::: ::: `:::.,:: :::: :::` ,,, ::` .:: :::.::. ,,,
11 | ,:: ::. ::: ::, ::` ::: ::::::::.,:: :::: :::::::` ::` ::::::: :::::::.
12 | ,:: ::. ::: ::, ::` ::: :::::::`,:: ::. :::::` ::` :::::: :::::.
13 | ::, ,:: ``
14 | ::::::::
15 | ::::::
16 | `,,`
17 |
18 |
19 | https://www.thingiverse.com/thing:2415199
20 | neopixel clock by arradan is licensed under the Creative Commons - Public Domain Dedication license.
21 | http://creativecommons.org/publicdomain/zero/1.0/
22 |
23 | # Summary
24 |
25 | this is frame for neopixel clock with 60 led neopixel ring.
26 |
27 | # Print Settings
28 |
29 | Printer Brand: Prusa
30 | Printer: Prusa Clone
31 | Rafts: No
32 | Supports: Doesn't Matter
33 | Resolution: 0.2
34 | Infill: 40
--------------------------------------------------------------------------------
/3D enclosure/attribution_card.html:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 |
19 |
neopixel clock by arradan
20 | Published on July 2, 2017
21 | www.thingiverse.com/thing:2415199
22 |
23 | Creative Commons - Public Domain Dedication
24 |
25 |
26 |
31 |
--------------------------------------------------------------------------------
/3D enclosure/files/couvercle_horloge.STL:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andydoro/NeoPixel-60-Ring-Clock/d06e3a605689c900fffe2f2bce23d79ad973a253/3D enclosure/files/couvercle_horloge.STL
--------------------------------------------------------------------------------
/3D enclosure/files/tronçon_base.STL:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andydoro/NeoPixel-60-Ring-Clock/d06e3a605689c900fffe2f2bce23d79ad973a253/3D enclosure/files/tronçon_base.STL
--------------------------------------------------------------------------------
/3D enclosure/files/tronçon_horloge.STL:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andydoro/NeoPixel-60-Ring-Clock/d06e3a605689c900fffe2f2bce23d79ad973a253/3D enclosure/files/tronçon_horloge.STL
--------------------------------------------------------------------------------
/3D enclosure/images/22dce6c2f3b7f5bc79e17c8bd498e20f_preview_featured.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andydoro/NeoPixel-60-Ring-Clock/d06e3a605689c900fffe2f2bce23d79ad973a253/3D enclosure/images/22dce6c2f3b7f5bc79e17c8bd498e20f_preview_featured.jpg
--------------------------------------------------------------------------------
/3D enclosure/images/37e0972399dbdf9ed80ed566ae9276be_preview_featured.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andydoro/NeoPixel-60-Ring-Clock/d06e3a605689c900fffe2f2bce23d79ad973a253/3D enclosure/images/37e0972399dbdf9ed80ed566ae9276be_preview_featured.jpg
--------------------------------------------------------------------------------
/3D enclosure/images/5bc9c06891f443d6b0ef26026fb2811c_preview_featured.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andydoro/NeoPixel-60-Ring-Clock/d06e3a605689c900fffe2f2bce23d79ad973a253/3D enclosure/images/5bc9c06891f443d6b0ef26026fb2811c_preview_featured.jpg
--------------------------------------------------------------------------------
/3D enclosure/images/6d6008072107c3be835fff005facc976_preview_featured.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andydoro/NeoPixel-60-Ring-Clock/d06e3a605689c900fffe2f2bce23d79ad973a253/3D enclosure/images/6d6008072107c3be835fff005facc976_preview_featured.jpg
--------------------------------------------------------------------------------
/3D enclosure/images/c4b5dcd4da751cd00d1ae3eba0c92fd1_preview_featured.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andydoro/NeoPixel-60-Ring-Clock/d06e3a605689c900fffe2f2bce23d79ad973a253/3D enclosure/images/c4b5dcd4da751cd00d1ae3eba0c92fd1_preview_featured.jpg
--------------------------------------------------------------------------------
/3D enclosure/images/c7da2202001ef3739c67954b4c9dbb31_preview_featured.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andydoro/NeoPixel-60-Ring-Clock/d06e3a605689c900fffe2f2bce23d79ad973a253/3D enclosure/images/c7da2202001ef3739c67954b4c9dbb31_preview_featured.jpg
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Andrew Doro
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | NeoPixel 60 Ring Clock
2 | ======================
3 |
4 | For more information visit:
5 |
6 | http://andydoro.com/ringclock/ \
7 | [Adafruit Learn Guide](https://learn.adafruit.com/neopixel-60-ring-clock/)
8 |
9 | This project uses the DS1307 Real Time Clock with an Arduino to display the time as a series of colored arcs.
10 |
11 | With the NeoPixel 60 Ring, we have a perfect display for presenting the time with RGB LEDs!
12 |
13 | Hours are represented by red, minutes by green, seconds by blue. The arcs overlap and the colors mix. Minutes and seconds are each represented by a single green or blue LED, respectively. In the 12 hour version, a single red LED represent 24 minutes.
14 |
15 | Hardware
16 | -------
17 |
18 | * 4 x NeoPixel 1/4 60 Ring - so you can make a NeoPixel 60 Ring
19 | * DS1307 Real Time Clock breakout board
20 | * Arduino Uno or other Arduino compatible microcontroller. This will even work with the Trinket 5V!
21 | * Adafruit Perma-Proto Half-sized Breadboard PCB
22 |
23 | If you are new to microcontrollers and Arduino, I would recommend starting out by building the circuit using the Arduino Uno and a breadboard.
24 |
25 | If you are more familiar with Arduino, you can use a Trinket 5V and perfboard to build a more permanent electronics project.
26 |
27 |
28 | Software
29 | -------
30 |
31 | Required libraries:
32 |
33 | * [Adafruit_NeoPixel](https://github.com/adafruit/Adafruit_NeoPixel)
34 | * [RTClib](https://github.com/adafruit/RTClib)
35 | * [DST_RTC](https://github.com/andydoro/DST_RTC)
36 |
37 |
38 | 3D enclosure created by [arradan](https://www.thingiverse.com/arradan/about)
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/neopixelringclock60/neopixelringclock60.ino:
--------------------------------------------------------------------------------
1 | /**************************************************************************
2 | * *
3 | NeoPixel Ring Clock
4 | by Andy Doro (mail@andydoro.com)
5 | http://andydoro.com/ringclock/
6 | * *
7 | **************************************************************************
8 |
9 |
10 | Revision History
11 |
12 | Date By What
13 | 20140320 AFD First draft
14 | 20160105 AFD Faded arcs
15 | 20160916 AFD Trinket compatible
16 | 20170727 AFD added STARTPIXEL for 3D enclosure, variable starting point, added automatic DST support
17 | 20180424 AFD using DST library https://github.com/andydoro/DST_RTC
18 | 20181231 AFD nighttime dimming
19 | */
20 |
21 | // include the library code:
22 | #include
23 | #include
24 | #include "DST_RTC.h" // download from https://github.com/andydoro/DST_RTC
25 |
26 | #include
27 |
28 | // define pins
29 | #define NEOPIN 3
30 |
31 | #define STARTPIXEL 0 // where do we start on the loop? use this to shift the arcs if the wiring does not start at the "12" point
32 |
33 | RTC_DS1307 rtc; // Establish clock object
34 | DST_RTC dst_rtc; // DST object
35 |
36 | // Define US or EU rules for DST comment out as required. More countries could be added with different rules in DST_RTC.cpp
37 | const char rulesDST[] = "US"; // US DST rules
38 | // const char rulesDST[] = "EU"; // EU DST rules
39 |
40 | Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, NEOPIN, NEO_GRB + NEO_KHZ800); // strip object
41 |
42 | byte pixelColorRed, pixelColorGreen, pixelColorBlue; // holds color values
43 |
44 | // nighttime dimming constants
45 | // brightness based on time of day- could try warmer colors at night?
46 | #define DAYBRIGHTNESS 64
47 | #define NIGHTBRIGHTNESS 20
48 |
49 | // cutoff times for day / night brightness. feel free to modify.
50 | #define MORNINGCUTOFF 7 // when does daybrightness begin? 7am
51 | #define NIGHTCUTOFF 22 // when does nightbrightness begin? 10pm
52 |
53 |
54 | void setup () {
55 | Wire.begin(); // Begin I2C
56 | rtc.begin(); // begin clock
57 |
58 | //Serial.begin(9600);
59 | // set pinmodes
60 | pinMode(NEOPIN, OUTPUT);
61 |
62 | if (! rtc.isrunning()) {
63 | // Serial.println("RTC is NOT running!");
64 | // following line sets the RTC to the date & time this sketch was compiled
65 | rtc.adjust(DateTime(__DATE__, __TIME__));
66 | // DST? If we're in it, let's subtract an hour from the RTC time to keep our DST calculation correct. This gives us
67 | // Standard Time which our DST check will add an hour back to if we're in DST.
68 | DateTime standardTime = rtc.now();
69 | if (dst_rtc.checkDST(standardTime) == true) { // check whether we're in DST right now. If we are, subtract an hour.
70 | standardTime = standardTime.unixtime() - 3600;
71 | }
72 | rtc.adjust(standardTime);
73 | }
74 |
75 |
76 | strip.begin();
77 | //strip.show(); // Initialize all pixels to 'off'
78 |
79 | strip.setBrightness(DAYBRIGHTNESS); // set brightness
80 |
81 | // startup sequence
82 | delay(500);
83 | colorWipe(strip.Color(255, 0, 0), 20); // Red
84 | colorWipe(strip.Color(0, 255, 0), 20); // Green
85 | colorWipe(strip.Color(0, 0, 255), 20); // Blue
86 | delay(500);
87 |
88 | }
89 |
90 | void loop () {
91 |
92 | // get time
93 | DateTime theTime = dst_rtc.calculateTime(rtc.now()); // takes into account DST
94 |
95 | byte secondval = theTime.second(); // get seconds
96 | byte minuteval = theTime.minute(); // get minutes
97 | int hourval = theTime.hour(); // get hours
98 |
99 | // change brightness if it's night time
100 | // check less often, once per minute
101 | if (secondval == 0) {
102 | if (hourval < MORNINGCUTOFF || hourval >= NIGHTCUTOFF) {
103 | strip.setBrightness(NIGHTBRIGHTNESS);
104 | } else {
105 | strip.setBrightness(DAYBRIGHTNESS);
106 | }
107 | }
108 |
109 | hourval = hourval % 12; // This clock is 12 hour, if 13-23, convert to 0-11`
110 |
111 | hourval = (hourval * 60 + minuteval) / 12; //each red dot represent 24 minutes.
112 |
113 | // arc mode
114 | for (uint8_t i = 0; i < strip.numPixels(); i++) {
115 |
116 | if (i <= secondval) {
117 | // calculates a faded arc from low to maximum brightness
118 | pixelColorBlue = (i + 1) * (255 / (secondval + 1));
119 | //pixelColorBlue = 255;
120 | }
121 | else {
122 | pixelColorBlue = 0;
123 | }
124 |
125 | if (i <= minuteval) {
126 | pixelColorGreen = (i + 1) * (255 / (minuteval + 1));
127 | //pixelColorGreen = 255;
128 | }
129 | else {
130 | pixelColorGreen = 0;
131 | }
132 |
133 | if (i <= hourval) {
134 | pixelColorRed = (i + 1) * (255 / (hourval + 1));
135 | //pixelColorRed = 255;
136 | }
137 | else {
138 | pixelColorRed = 0;
139 | }
140 |
141 | strip.setPixelColor((i + STARTPIXEL) % 60, strip.Color(pixelColorRed, pixelColorGreen, pixelColorBlue));
142 | }
143 |
144 | //display
145 | strip.show();
146 |
147 | // printTheTime(theTime);
148 |
149 | // wait
150 | delay(100);
151 |
152 | }
153 |
154 |
155 | // Fill the dots one after the other with a color
156 | void colorWipe(uint32_t c, uint8_t wait) {
157 | for (uint16_t i = 0; i < strip.numPixels(); i++) {
158 | //strip.setPixelColor(i, c);
159 | strip.setPixelColor((i + STARTPIXEL) % 60, c);
160 | strip.show();
161 | delay(wait);
162 | }
163 | }
164 |
--------------------------------------------------------------------------------