Full Color Lighting Product Development Kit

Last Updated on : 2024-07-31 07:08:40download

This topic describes the Full Color Lighting Product Development Kit, built on the Networked Product Development Framework, to help you efficiently create unique full color lighting products. This kit enables you to create lights that feature cool and warm white and RGB, dimming, color changing, and various smart features.

Resource requirements

Hardware resource

Peripheral Count Description
PWM 2 to 5 Used for PWM dimming driver. If you do not need this driver, there is no need to register it.
GPIO 2 Use GPIO to simulate I2C for driving I2C dimmers. If you do not need this driver, there is no need to register it.
ADC 1 Collect sounds for local music. If you do not enable the local music feature, this driver is not needed.
Timer 1 Hardware timer, used to schedule color gradient tasks.
UART 1 Communicate with the Tuya host software for module production testing. If you do not use Tuya’s production testing tool, this driver is not needed.

Software resource

Resource Size
ROM About 70 KB
RAM About 15 KB. As more scheduled tasks are added, memory consumption will increase.

Capability map

Business logic

Capability
Description
Product startup process Implement the entry point function for the application to manage the required startup processes.
Event processing mechanism An event scheduling driver that triggers application events to manage the logic between product feature modules.
Feature configuration management The product development kit introduces the Kconfig feature, enabling you to configure features through a graphical user interface with menus.

Tuya-enabled features

Capability
Description
Power-on count Many lighting products do not come with buttons. They are reset by power cycling to enter pairing mode or unbind from the cloud.
End product testing Scan the specified test router (default SSIDs: tuya_mdev_test1 and tuya_mdev_test2, or custom) to initiate aging tests and end product tests.
Initial device state Set the initial light state to Do Not Disturb, factory default, memory, or user-defined mode.
On/off management Manage the status of the device’s main switch.
Network indicator The indicator can flash quickly or slowly to signify network status.
Mode management Manage four modes (white light, RGB light, scene, and music) and record and report the current mode status.
Full color dimming and color changing Cool white light enhances daily life, while warm white light creates a romantic atmosphere. With 16 million colors to choose from, users can customize color temperature, brightness, and hue to achieve the perfect ambiance. Control the living room lights from the bedroom with the mobile app to turn them on or off and adjust brightness and colors.
Full color scene mode Preset modes for reading, working, relaxing, and bedtime allow users to switch between modes with just a touch.
Full color music mode The lights sync their colors and patterns with the rhythm and beat of local or cloud music.
Countdown Users specify a time delay. After the timer is done, the device automatically turns on or off based on its current on/off state.
  • If the device is on now, it will be turned off after the timer is done.
  • If the device is off now, it will be turned on after the timer is done.
Cycle schedule A cycle schedule alternates a device between on and off states over a set time period, making it easy to automate lighting routines, such as for plant grow lights.
Set a total cycle time of at least two minutes. During this period, users can specify the duration for which the device is on and off. They can set the color and brightness during the light-on period and repeat this pattern.
Random schedule Random timing helps to keep the home secure because it can create the illusion that someone is at home while users are away.
During a scheduled time period, the light turns on and off randomly, regardless of its current state.
This creates the impression that someone is home, deterring burglars from attempting a break-in.
Biorhythm based schedule The biorhythm lighting feature allows users to personalize the brightness and color temperature of lights so that it is tailor-made to the individual needs, the rhythm of a day, and mood. Divide a day into N segments (1 ≤ N ≤ 8), each with distinct brightness and color temperature to mimic the natural lighting conditions. The device mimics daylight circadian rhythm according to the specified N segments.
Sleep schedule In the evening at bedtime, the lights can gradually fade out over a set period of time, providing a relaxing way to drift off to sleep.
Wake-up schedule The lights can simulate daylight by gradually getting brighter over a set period of time, reaching full brightness at the time you are supposed to be getting out of bed. The gradual lighting helps to ease you out of heavy sleep stages so you can wake up more easily and less groggily.

Basic services

Capability
Description
Full color local scene The development kit includes preset scenes and supports custom scenes.
Full color local music Provide standard and extended music sync modes.
Lighting data storage Store the memory data for each feature module.
Delay storage To prevent frequent memory writes, only the data from the most recent storage action is saved within a window, such as five seconds.
Biorhythm based schedule Divide a day into multiple time frames. Notify the application layer via a callback when a specific time is reached.
Random/cycle schedule Notify the application layer via a callback when the specified time is reached.
Countdown Notify the application layer via a callback when the countdown hits zero.
Color gradient Set the current color, target color, and transition duration. The gradient service automatically calculates the color value for each step. You can implement features such as pulsating effect and gradient effect.
Schedule Weekly schedules form the basis for complex scheduling, including random, cyclical, sleep, and wake patterns.
Color conversion Convert between HSVBT and RGBCW color formats, calculate gamma, and impose power limitations.

Product drivers

Capability
Description
Full color dimming driver Supports multiple dimming drivers, including PWM, BP1658CJ, and SM2x35EGH, through a unified API.
Audio capture Capture audio using an ADC.