Skip to content

Commit 4bd7f0c

Browse files
committed
Initial commit
1 parent d3829bd commit 4bd7f0c

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
SparkFun Melexis MLX90632 Interface Library
12
===========================================================
23

4+
![SparkFun Infrared Non-contact Thermometer (Qwiic) - MLX90632](https://cdn.sparkfun.com//assets/parts/1/2/7/0/3/14569-MLX90632-Qwiic-01.jpg)
35

6+
[*SparkX Infrared Non-contact Thermometer (Qwiic) - MLX90632 (SPX-14569)*](https://www.sparkfun.com/products/14569)
47

8+
The SparkFun Infrared Non-contact Thermometer uses the MLX90632 FIR sensor to detect surface temperature without touching the object. This gives you amazing 1 C prescision from a distance of a few inches.
59

610
Library written by Nathan Seidle ([SparkFun](http://www.sparkfun.com)).
711

@@ -17,6 +21,7 @@ Documentation
1721
--------------
1822

1923
* **[Installing an Arduino Library Guide](https://learn.sparkfun.com/tutorials/installing-an-arduino-library)** - Basic information on how to install an Arduino library.
24+
* **[Product Repository](https://github.com/sparkfunX/Qwiic_NonContact_Thermo_MLX90632)** - Main repository (including hardware files)
2025

2126
License Information
2227
-------------------
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
Using the MLX90632 FIR Sensor
3+
By: Nathan Seidle
4+
SparkFun Electronics
5+
Date: December 21st, 2017
6+
License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license).
7+
8+
Feel like supporting our work? Buy a board from SparkFun!
9+
https://www.sparkfun.com/products/14569
10+
11+
This example shows how to remotely read the surface temperature of whatever the sensor is pointed at.
12+
13+
Hardware Connections:
14+
Attach the Qwiic Shield to your Arduino/Photon/ESP32 or other
15+
Plug the sensor onto the shield
16+
Serial.print it out at 9600 baud to serial monitor.
17+
18+
Available functions:
19+
.getObjectTemp()
20+
.getObjectTempF()
21+
.getSensorTemp()
22+
.setMode() - MODE_SLEEP, MODE_STEP, MODE_CONTINUOUS
23+
.getMode()
24+
.enableDebugging()
25+
.disableDebugging()
26+
.deviceBusy()
27+
.dataAvailable()
28+
*/
29+
30+
#include <Wire.h>
31+
32+
#include "SparkFun_MLX90632_Arduino_Library.h"
33+
MLX90632 myTempSensor;
34+
35+
void setup()
36+
{
37+
Serial.begin(9600);
38+
Serial.println("MLX90632 Read Example");
39+
40+
Wire.begin();
41+
42+
myTempSensor.begin();
43+
}
44+
45+
void loop()
46+
{
47+
float objectTemp;
48+
49+
//For the world
50+
objectTemp = myTempSensor.getObjectTemp(); //Get the temperature of the object we're looking at in C
51+
Serial.print("Object temperature: ");
52+
Serial.print(objectTemp, 2);
53+
Serial.print(" C");
54+
55+
//For us silly people that use Fahrenheit
56+
/*objectTemp = myTempSensor.getObjectTempF(); //Get the temperature of the object we're looking at in F
57+
Serial.print("Object temperature: ");
58+
Serial.print(objectTemp, 2);
59+
Serial.print(" F");*/
60+
61+
Serial.println();
62+
}
63+

0 commit comments

Comments
 (0)