Maker.io main logo

Multifunctional Clock

2023-01-02 | By M5Stack

License: General Public License Arduino

Thank you for the source code and project information by @FE B

 

Things used in this project

Hardware components

M5Stack FIRE IoT Development Kit (PSRAM 2.0) x1

Software apps and online services

Arduino IDE

Story
 

 

4

5

6

 

1. Clock / Date Page:

Gets the time / date from NTPServer. This screen also shows Battery Left / Charging.

 

2. Temperature Page:

Gets the temperature from MQTT message.

 

3. Alarm Page:

Alarm blinks the RGB LEDs and buzzer sound included. Can be set by MQTT message.

 

4. Timer Page:

Alarm blinks the RGB LEDs and buzzer sound included. Can be set by MQTT message.

 

MQTT API:

Command Topic: m5ikea/command

Command message:

Copy Code
{
"temperature": -8,
"brightness": 10,
"powersave": true,
"timer" : "03:15",
"alarm" : "14:12"
}

You can use only one of, or more of the commands in the json like:

Copy Code
{"temperature": 34}

temperature (signed float): It still will show as signed integer in the clock.

brightness (unsigned integer): Between 0-100, 100 being brightest, 1 dimmest, 0 shut down LCD.

powersave (boolean): true dims the LCD to "10" after keeping the clock some seconds in the same position, whether plugged in or battery.

timer (char, XX:XX): 00:00 to 99:99

alarm (char, XX:XX): 00:00 to 23:59

This uses the MPU8668 accelerator version of M5Stack Fire (core). If your m5Stack has MPU9250 (Early version) or other, you need to change the accelerometer code. Compiled with Arduino IDE 2.0

 

Code

febalci / M5Stack_IKEA_Clock

制造商零件编号 K007-V26
DEV KIT FIRE IOT PSRAM V2.6
M5Stack Technology Co., Ltd.
¥406.19
Details
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum