TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137084 times)
  2. FAT32 Library (70227 times)
  3. Network Ethernet Library (56097 times)
  4. USB Device Library (46427 times)
  5. Network WiFi Library (42042 times)
  6. FT800 Library (41382 times)
  7. GSM click (29110 times)
  8. mikroSDK (26558 times)
  9. PID Library (26487 times)
  10. microSD click (25486 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

IR Sense 2 click

Rating:

5

Author: MIKROE

Last Updated: 2018-03-23

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Temperature & humidity

Downloaded: 4947 times

Not followed.

License: MIT license  

IR Sense 2 click is the infrared sensor Click board, designed to be used for the short range IR sensing applications. Unlike other pyroelectric sensors, it is able to sense environmental heat changes up to 1m, even through the glass.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "IR Sense 2 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "IR Sense 2 click" changes.

Do you want to report abuse regarding "IR Sense 2 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

IR Sense 2 click

IR Sense 2 click

Native view of the IR Sense 2 click board.

View full image
IR Sense 2 click

IR Sense 2 click

Front and back view of the IR Sense 2 click board.

View full image

Library Description

The library contains basic functions for reading from, and configuring the clicks registers,
as well as functions for calculation of temperature and IR data.

Key functions

uint8_t irsense2_readReg(uint8_t registerAddress) - generic read function.

void irsense2_writeReg(uint8_t registerAddress, uint8_t data_) - generic read function.

float irsense2_readTemp() - reads temperature data, and converts to Celsius degrees.

float irsense2_readIR() - reads IR data, and converts to pA.

Examples Description

The demo application is composed of three sections:

  • System Initialization - Initializes logger and I2C peripheral.
  • Application Initialization - Initializes click driver, and configures click settings to required values.
  • Application Task (code snippet) - Reads out IR and temperature data, and prints them out via UART.
void applicationTask()
{
 char txt[10] = {0};
 float temperature;
 float IRdata;
 temperature = irsense2_readTemp();
 FloatToStr(temperature, txt);
 mikrobus_logWrite("Temperature reading: ",_LOG_TEXT);
 mikrobus_logWrite(txt,_LOG_LINE);
 IRdata = irsense2_readIR();
 FloatToStr(IRdata, txt);
 mikrobus_logWrite("IR reading: ",_LOG_TEXT);
 mikrobus_logWrite(txt,_LOG_LINE);
 Delay_ms( 1000 );
}

mikroE Libraries used in the example:

  • UART
  • Conversions
  • C-String

Additional notes and information

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.

ALSO FROM THIS AUTHOR

MINI-M0 STM32 Board Examples

5

Examples for MINI-M0 STM32 Board. Provided examples demonstrate working with on-board LEDs, internal ADC and UART module via the USB UART interface.

[Learn More]

Silent Step 2 click

0

Silent Step 2 Click is a compact add-on board that allows extremely smooth and silent operation of the connected motor. This board features the TMC2130, a high-performance two-phase stepper motor driver from Analog Devices. The driver uses an external motor power supply of 4.75 up to 43V to power a 2-phase stepper motor up to 2A coil current (2.5A peak).

[Learn More]

Compass 5 click

5

Compass 5 Click is a compact add-on board that contains a 3-axis magnetometer device suitable for compass application. This board features the AK09918C, a 3-axis electronic compass with high sensitive Hall sensor technology from AKM Semiconductor.

[Learn More]