# Infrared microbit code

**URL:** <https://forum.core-electronics.com.au/t/infrared-microbit-code/7645>\
**Category:** Support\
**Created:** [29 April 2020 05:47 UTC](https://forum.core-electronics.com.au/t/infrared-microbit-code/7645 "2020-04-29T05:47:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Melissa110409](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@Melissa110409](https://forum.core-electronics.com.au/u/Melissa110409)\
**Post date:** [29 April 2020 05:47 UTC](https://forum.core-electronics.com.au/t/infrared-microbit-code/7645/1 "2020-04-29T05:47:41Z")

</div>

I’m wondering what type of infrared sensor would work best for a Micro:bit and if anyone has code that will work for the sensor? I’d like to build a Micro:bit thermometer that can test people’s temperature and need some advice. Many thanks!

---

<div class="post-metadata">

**Author:** ![Bryce](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/bryce/32/3631_2.png) [@Bryce](https://forum.core-electronics.com.au/u/Bryce)\
**Post date:** [30 April 2020 01:07 UTC](https://forum.core-electronics.com.au/t/infrared-microbit-code/7645/2 "2020-04-30T01:07:37Z")

</div>

Hi Melissa,

Sounds like a very interesting project. My personal preference in these kinds of projects incorporating the MicroBit with various sensors is to use a common protocol such as I2C which I’ve also linked some tutorials to getting started with below. As for the IR sensor Gravity has a sensor which is not currently available but should be suitable for the project when it arrives, but any I2C based IR thermometer should be a good fit too! All the best with your project!

> **[Non-contact IR Thermometer Sensor](https://core-electronics.com.au/non-contact-ir-thermometer-sensor.html)**
>
> We can divide temperature measurement in to two types: contact and non-contact. Contact measurement can only accurately measure temperature when the testing object and the sensor reach thermal equilibrium. This can mean longer response times and...

[https://tech.microbit.org/hardware/i2c/](https://tech.microbit.org/hardware/i2c/)

[https://microbit-micropython.readthedocs.io/en/latest/i2c.html](https://microbit-micropython.readthedocs.io/en/latest/i2c.html)

Bryce  
Core Electronics | Support
