A Hello World program showing how to get temperature readings from the MLX90614 infrared temperature sensor.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers gy-906.h Source File

gy-906.h

00001 #pragma once
00002 
00003 namespace gy906 {
00004 //const int default_addr = 0x5a;
00005 const int default_addr = 0x00;
00006 namespace opcode {
00007     const int eeprom_access = 0x20;
00008     const int ram_access = 0x00;
00009     const int read_flags = 0xf0;
00010     const int sleep = 0xff;
00011     const int read_mask = 0x80;
00012     const int write_mask = 0x00;
00013 }
00014 namespace eeprom {
00015     const int T0_max = 0x00;
00016     const int T0_min = 0x01;
00017     const int PWMCTRL = 0x02;
00018     const int Ta_range = 0x03;
00019     const int EC_coef = 0x04;
00020     const int config_reg1 = 0x05;
00021     const int SMBus_addr = 0x0e;
00022     const int id1 = 0x1c;
00023     const int id2 = 0x1d;
00024     const int id3 = 0x1e;
00025     const int id4 = 0x1f;
00026 }
00027 namespace ram {
00028     const int ir1 = 0x04;
00029     const int ir2 = 0x05;
00030     const int T_ambient = 0x06;
00031     const int T_obj1 = 0x07;
00032     const int T_obj2 = 0x08;
00033 }
00034 }