多功能时钟

多功能时钟

Multifunctional alarm clock for M5Stack Fire
electronics 创客 esp32 时钟

This project is a replication of IKEA Klockis Travel Clock on M5Stack:

多功能时钟
IKEA Klockis Clock

M5stack Version shows date and time, and when you roll it over 90 degrees it shows temperature, and roll it again there comes timer and roll one more time, there it is.

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:

{
    "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:

{"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 sceonds 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

代码:https://github.com/febalci/M5Stack_IKEA_Clock


评论:
相关文章
【ESP32 C++教程】Unit5-2 执行器件之舵机

本节主要讲解舵机驱动类和用按键控制舵机。


【ESP32 C++教程】Unit5-1 执行器件之继电器

本节主要讲解执行器件类型和用按键控制继电器。


【ESP32 C++教程】Unit4-3 红外接收和遥控

本小节主要讲解红外接收和遥控器件,以及遥控操作LED。


【ESP32 C++教程】Unit4-2 模拟量传感器

本小节讲解模拟量传感器使用,旋转电位器,DHT11温湿度传感器和实现自定义传感器类。


【ESP32 C++教程】Unit4-1 数字量传感器

本小节讲解Sensor类及派生类、数字量传感器使用和传感器的推荐交互流程。


【ESP32 C++教程】Unit3-2 触摸输入

本小节讲解ESP32内置触摸引脚的用法,


【ESP32 C++教程】Unit3-1 按键输入

本小节主要介绍按键信号转换、Button类及派生类、和Button交互推荐流程。


【ESP32 C++教程】Unit2-2 Ws2812灯珠

本小节主要介绍Ws2812灯珠的使用、对父类进行扩展实现自定义功能,和指针向下强制转换的使用。


【ESP32 C++教程】Unit2-1 RGB三色LED

本小节主要介绍RGB三色LED的使用,以及多态的具体实现。


【ESP32 C++教程】Unit1-3 ESP32 Arduino 开发框架

ESP32 Arduino Framework是专门针对ESP32开发板的Arduino应用开发框架,为用户开发IOT应用、HMI应用提供一致的开发体验。