lightmixsens 2.0.0.0
main.c File Reference

LightMixSens Click example. More...

#include "board.h"
#include "log.h"
#include "lightmixsens.h"

Functions

void prox_app (void)
 Light mix sens proximity function.
 
void application_init (void)
 
void application_task (void)
 
int main (void)
 

Variables

lightmixsens_data_obj lightmixsens_data
 
char prox_str [20]
 

Detailed Description

LightMixSens Click example.

Description

This example show usage of Light Mix Sens Click. It switches the IR light for separate and measure sectar of RGB lights. Click also measure proximity from the object using light source.

The demo application is composed of two sections :

Application Init

Initializes all necessary peripherals and pins, initializes I2C driver and performs the Click board default configuration to allow ALS/Color and Proximity measurements.

Application Task

Waits until ALS/Color integration cycle was done and then reads the entire measurement. The all results will be sent to the selected UART terminal.

Additional Functions :

  • prox_app - This is application function which determines the proximity results.
Author
MikroE Team

Function Documentation

◆ application_init()

void application_init ( void )

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 )

◆ main()

int main ( void )

◆ prox_app()

void prox_app ( void )

Light mix sens proximity function.

This is function which determines the proximity results.

Variable Documentation

◆ lightmixsens_data

lightmixsens_data_obj lightmixsens_data

◆ prox_str

char prox_str[20]