Skillnad mellan versioner av "Grove - Digital Infrared Temperature Sensor"

Från Karlskrona Makerspace Wiki
Hoppa till: navigering, sök
 
Rad 1: Rad 1:
 
+
[[Fil:Grove-digital-infrared-temperature-sensor.png|200px|thumb|right|Grove - Digital Infrared Temperature Sensor]]
 
Temperaturintervall: -40 - 85 C
 
Temperaturintervall: -40 - 85 C
  

Versionen från 29 oktober 2018 kl. 09.20

Grove - Digital Infrared Temperature Sensor

Temperaturintervall: -40 - 85 C

Kompatibilitet

Port

  • Digital

Bibliotek

https://github.com/Seeed-Studio/Digital_Infrared_Temperature_Sensor_MLX90615

Exempelkod

Arduino

#include "MLX90615.h"
#include <I2cMaster.h>

#define SDA_PIN 3   //define the SDA pin
#define SCL_PIN 2   //define the SCL pin

SoftI2cMaster i2c(SDA_PIN, SCL_PIN);
MLX90615 mlx90615(DEVICE_ADDR, &i2c);


void setup()
{
  Serial.begin(9600);
  Serial.println("Setup...");

  //mlx90615.writeEEPROM(Default_Emissivity); //write data into EEPROM when you need to adjust emissivity.
  //mlx90615.readEEPROM(); //read EEPROM data to check whether it's a default one.
}

void loop()
{
  Serial.print("Object temperature: ");
  Serial.println(mlx90615.getTemperature(MLX90615_OBJECT_TEMPERATURE));
  Serial.print("Ambient temperature: ");
  Serial.println(mlx90615.getTemperature(MLX90615_AMBIENT_TEMPERATURE));
  
  delay(1000);
}

Mer information

http://wiki.seeedstudio.com/Grove-Digital_Infrared_Temperature_Sensor/