Introduction: Synesthetic Clock
A person with synesthesia may associate certain letters and numbers with certain colors.
The principle of an Arduino RTC clock is old and has been described many times. But this display is new. The hours and minutes are shown on two round displays, both using the 12 hour and 60 minute system respectively. Instead of clock hands, I use colored areas, a.m. and p.m. are represented by the colors blue and red on the left side. The minute display on the right side changes color from blue to green to yellow and red as the hour progresses, following the color spectrum.
The color principle can also be found on maps: blue is far away (low), red is near (high),
I hope to achieve a synesthetic effect by recognizing the time by the colors as they occur in nature (cool morning, warm evening) and not by the man-made numbers.
Of course, the colors can be individually programmed according to your aesthetic preferences.
Basic Arduino knoledge acquired.
Supplies
- ESP32 (e.g. Arduino nano is too slow)
- 2x GC9a01 round display
- Real Time Clock Module (RTC)
- wires
- material for a case: wood, cardboard, plastic, 3D printed, a book,…
Step 1: The Wiring
Follow the wiring plan. All connected devices have 3.3 volts and GND in common. The two displays have SCL(18) and SDA (23) in common.
Step 2: Graphics
The displays should actually show circular arcs to indicate progress over time. Unfortunately, I could not find a fillArc function in this library. Instead, triangles are drawn whose ends can be controlled by coordinates but lie outside the visible area. The effect is the same. I use the angle function tangent to calculate the size of the triangle. For a circle of 360°, each minute has an angle of 6°.
x120/y120 is the center of our coordinate system. I use a separate calculation for each quadrant.
// draw minutes
if (m<=90){
x= tan(radians(m)) *120;
tft2.fillTriangle(startx, starty, 120, 0, x+120, 0, color);
}
if ((m>90) && (m<=180)){
y= tan(radians(m-90)) *120;
tft2.fillTriangle(startx, starty, 240, 120, 240, y+120, color);
tft2.fillRect(119, 0, 240, 120, color);
}
if ((m>180) && (m<=270)){
x= tan(radians(m-180)) *120;
tft2.fillTriangle(startx, starty, 120, 240, 120-x, 240, color);
tft2.fillRect(119, 0, 240, 240, color);
}
if ((m>270) && (m<=360)){
y= tan(radians(m-270)) *120;
tft2.fillTriangle(startx, starty, 0, 120, 0, 120-y, color);
tft2.fillRect(119, 0, 240, 240, color);
tft2.fillRect(0, 120, 120, 240, color);
}
if ((m==0) ||(m==360)){
tft2.fillScreen(COLOR00);
}
Step 3: Software
The ESP32 is getting time signals of hour and minute (and more) from the RTC. Our software is extracting hour and minute and using it for our two displays.
Upload either the demo program for the graphic (without RTC) or the entire program with time signal. Don't forget to download 'colors.h' and place it in the same folder as the main file. This file contains the definitions for the colors.
Step 4: Case
I chose an oak housing for aesthetic reasons. You can follow the development on the pictures:
Cut the wood to size, drill holes (diameter 3.8 cm), hollow out from the back with a router and chisel, sand it, oil it.
Step 5: Bringing It Together
Insert the two displays carefully and accurately and fix them in place with hot glue. Stow the cables, RTC and ESP in it and ensure that there is no short circuit.
I simply use cardboard as a backside cover. Finished.