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: 2021-02-16
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Proximity
Downloaded: 2060 times
Not followed.
License: MIT license
Smoke 2 Click is a compact add-on board that contains the most efficient version of the smoke detector. This board features the ADPD188BI, a complete photometric system for smoke detection using optical dual-wavelength technology from Analog Devices.
Do you want to subscribe in order to receive notifications regarding "Smoke 2 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Smoke 2 click" changes.
Do you want to report abuse regarding "Smoke 2 click".
Library Description
Library provides functions for communicating and fully control device. There are specific functions for reading data from slots A and B, setting interrupt mask and reseting device.
Key functions:
uint8_t smoke2_get_int_pin ( void )
- Get state of int pinuint16_t smoke2_read_data ( uint8_t reg )
- Generic function for reading data from registarvoid smoke2_write_data ( uint8_t reg, uint16_t tx_data )
- Generic function for writing bit stateExamples description
The application is composed of three sections :
void application_task ( )
{
if ( EXAMPLE_MODE_SMOKE == example_mode )
{
smoke_example( );
}
else
{
proximity_example( );
}
}
Additional Functions :
The full application code, and ready to use projects can be found on our LibStock page.
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.