We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2020-02-12
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Proximity
Downloaded: 3114 times
Not followed.
License: MIT license
Proximity 13 Click based on SI1153-AB09-GMR IC from Silicon Labs that can be used as an proximity, and gesture detector with I2C digital interface and programmable-event interrupt output. The host can send command the Proximity 13 click to initiate on-demand proximity measurements.
Do you want to subscribe in order to receive notifications regarding "Proximity 13 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Proximity 13 click" changes.
Do you want to report abuse regarding "Proximity 13 click".
Library Description
Librari provides functions for reading and writing to registers. You have functions for setting parameters, sending commands and configurating device channels. There is function for reading all channels if they are enabled.
Key functions:
uint8_t proximity13_generic_read ( uint8_t reg_adr )
- Generic read function from registersvoid proximity13_generic_write ( uint8_t reg_adr, uint8_t write_data )
- Generic write function to registersuint8_t proximity13_get_int_pin_status ( void )
- Function for reading status of int pinuint8_t proximity13_send_command ( uint8_t cmd_val )
- Function for sending commandsuint8_t proximity13_set_parameter ( uint8_t param, uint8_t cmd_val )
- Function for setting parametersuint8_t porximity13_config_channel ( uint8_t chn_num, proximity13_cfg_t cfg_val )
- Function for configurating specific channelvoid proximity13_read_channels ( proximity13_chn_val_t *chn_val )
- Fucnction for reading from all enabled channelsExamples description
The application is composed of three sections :
void application_task ( )
{
proximity13_chn_val_t chn_val;
char txt[ 30 ];
proximity13_read_channels( &chn_val );
WordToStr( chn_val.channel_1, txt );
mikrobus_logWrite( "Data :", _LOG_TEXT );
mikrobus_logWrite( txt, _LOG_LINE );
Delay_ms ( 100 );
}
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.