color17 2.1.0.0
main.c File Reference

Color 17 Click example. More...

#include "board.h"
#include "log.h"
#include "color17.h"

Macros

#define COLOR17_LIM_DARK_LUX   10.0
 
#define COLOR17_CCT_LIM_BLUE_COLOR   7000
 
#define COLOR17_CCT_LIM_LIGHT_BLUE_COLOR   4000
 
#define COLOR17_CCT_LIM_GREEN_COLOR   3100
 
#define COLOR17_CCT_LIM_YELLOW_COLOR   2400
 
#define COLOR17_CCT_LIM_ORANGE_COLOR   1950
 
#define COLOR17_CCT_LIM_RED_COLOR   1600
 

Functions

void color17_display_color (void)
 Color 17 display color function.
 
void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

Color 17 Click example.

Description

This library contains API for the Color 17 Click driver. This example displays CCT data, Light intensity level and the light color names.

The demo application is composed of two sections :

Application Init

Initialization of I2C module and log UART. After driver initialization, default settings turn on the device.

Application Task

This example demonstrates the use of the Color 17 Click board™. Reads and displays the correlated color temperature and Light intensity level. This example also detects and displays the light color names. Results are being sent to the UART Terminal, where you can track their changes.

Note
Color detection is obtained based on the analysis of calculate the correlated color temperature (CCT) data and the CIE 1931 chromaticity diagram. For more details please refer to the “OPT4048 High Speed High Precision Tristimulus XYZ Color Sensor datasheet” (https://www.ti.com/lit/gpn/OPT4048).
Author
Nenad Filipovic

Macro Definition Documentation

◆ COLOR17_CCT_LIM_BLUE_COLOR

#define COLOR17_CCT_LIM_BLUE_COLOR   7000

◆ COLOR17_CCT_LIM_GREEN_COLOR

#define COLOR17_CCT_LIM_GREEN_COLOR   3100

◆ COLOR17_CCT_LIM_LIGHT_BLUE_COLOR

#define COLOR17_CCT_LIM_LIGHT_BLUE_COLOR   4000

◆ COLOR17_CCT_LIM_ORANGE_COLOR

#define COLOR17_CCT_LIM_ORANGE_COLOR   1950

◆ COLOR17_CCT_LIM_RED_COLOR

#define COLOR17_CCT_LIM_RED_COLOR   1600

◆ COLOR17_CCT_LIM_YELLOW_COLOR

#define COLOR17_CCT_LIM_YELLOW_COLOR   2400

◆ COLOR17_LIM_DARK_LUX

#define COLOR17_LIM_DARK_LUX   10.0

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ color17_display_color()

void color17_display_color ( void )

Color 17 display color function.

This function displays the light color names.

Returns
Nothing.
Note
None.

◆ main()

int main ( void )