RGB HexMatrix | IOT Clock
Intro: RGB HexMatrix | IOT Clock
HexMatrix is the LED matrix having many triangular pixels. Six pixels combining makes a hexagon. There are many different animations that can be shown on the matrix form FastLED library, Also I have designed digits from 0 to 9 using 10 segments for each digit in the matrix and made a IOT clock.
STEP 1: 3D Printing:
- 3D print all given 3D models: Click here for STL Files and Codes
- Print the screen layer in white PLA.
STEP 2: Circuit Connections:
- Make all the connections as shown in circuit diagram.
- GND~-Ve
- Vin~5V~+Ve
- DataIn ~ Pin 2
- Also extend the power supply wires to last LED and connect, to prevent the voltage drop across the LEDs.
STEP 3: Note:
- If you use Arduino board then you can only display animations,you cannot display time.
- If you use ESP8266 board then we can display time and other animations on the matrix.
STEP 4: Assembly:
- Put all the LEDs in snake wise order.
- Assemble everything together.
- Solder the connector to Microcontroller board , the connector is taken from the other end of the LEDs line.
STEP 5: Coding:
- Click here for codes
- For this matrix I have made three codes HexMatrix.ino ,clock1.ino and clock2.ino.
- HexMatrix code is the code for displaying animations on the matrix,it can run on any Microcontroller board.
- Clock and clock2 code only runs on ESP8266 boards.
HexMatrix.ino:
- Open the code given in Arduino IDE.
- Install the FastLED Library in Arduino IDE.
- Select the board type,port and upload the code.
Clock1 and Clock2 Codes:
- Open the code in Arduino IDE.
- In this code we can change this values as per our color requirement
//Digit color values in RGB
int r=255;
int g=255;
int b=255;
//Background color values in RGB
int br=0;
int bg=20;
int bb=10;
- Enter the Wifi name and password
const char* ssid = "Wifi_Name";
const char* password = "Password";
- Enter the time zone of your country(India 5:30=5.5 similarly enter your time zone)
//Your time zone
int timezone = -5.5 * 3600;
- Select the board type as ESP8266,select the port and upload the code.
- Apart from this we also have many other animations in the FastLED Examples.
104 Comments
medvezhonok1977 1 year ago
barathaned 1 year ago
k1200s 1 year ago
I've powered it with a 3A supply in LED #1, #50 and #96 to prevent some brightness loss.
Parallel with the supply of the LEDs there is a 1000uF capacitor.
FastLed library installed is 3.5
Thanks for any input!
barathaned 1 year ago
Alexanderd29 1 year ago
exit status 1
Compilation error: conflicting declaration 'CRGB leds [96]'
k1200s 1 year ago
Thanks!
Mukesh_Sankhla 1 year ago
ctbaker71 3 years ago
I modified the original code to add a zero for minutes 0 through 9 and I added a night mode where the LEDs will turn off and turn back on at hours you define. I have posted my version of the code at:
https://github.com/shatter71/HexClock
I also fixed the non-manifold errors with the original piece that holds the LEDs and then designed a new housing where you print the face and sides as one piece and then the back is printed separately. The back piece will accommodate a female barrel power socket. These files are posted on thingiverse at the link below. I also provided the Fusion360 files and set them up to utilize parametric design so you can easily define the opening for the LEDs and all of the openings will be resized. In my case, I made the opening 8.1mm.
https://www.thingiverse.com/thing:4590275
Thanks again for this great project!
Foo_Plinger 2 years ago
//Your time zone
int timezone = -5 * 3600; //UTC offset * 3600
int dst = 1; //Default to DST is in effect
ctbaker71 2 years ago
I went back and modified the daylight savings time auto adjustment code and pushed the update to my github repo. From my testing, it looks to now be working properly.
Thanks!
Mukesh_Sankhla 3 years ago
papatrice1 2 years ago
d'inversion d'affichage de l'heure en mirroir
dwc309 3 years ago
k1200s 3 years ago
Do you think that it's enough to change the line
#define LED_PIN 2
to
#define LED_PIN 3 or 4 (which corresponds to GPIO0 and GPIO2)?
Thanks!
Eduardo
lrylove 3 years ago
I wonder if the 5V/2A power supply is enough as I found the highest power of each LED is 0.3W?
Mukesh_Sankhla 3 years ago
lrylove 3 years ago
Foo_Plinger 3 years ago
Mukesh_Sankhla 3 years ago
check out this it may help you https://www.instructables.com/RGB-HexMatrix-IOT-Cl...
luckydedaojing 3 years ago
But I had some problems
LED time display reversal, LED lights I've seen the order is correct, I use the lights are WS2812, there are ways to solve it?