A Hello World program showing how to get temperature readings from the MLX90614 infrared temperature sensor.
Diff: gy-906.h
- Revision:
- 0:964606fa7e7a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gy-906.h Wed May 11 17:48:57 2016 +0000 @@ -0,0 +1,34 @@ +#pragma once + +namespace gy906 { +//const int default_addr = 0x5a; +const int default_addr = 0x00; +namespace opcode { + const int eeprom_access = 0x20; + const int ram_access = 0x00; + const int read_flags = 0xf0; + const int sleep = 0xff; + const int read_mask = 0x80; + const int write_mask = 0x00; +} +namespace eeprom { + const int T0_max = 0x00; + const int T0_min = 0x01; + const int PWMCTRL = 0x02; + const int Ta_range = 0x03; + const int EC_coef = 0x04; + const int config_reg1 = 0x05; + const int SMBus_addr = 0x0e; + const int id1 = 0x1c; + const int id2 = 0x1d; + const int id3 = 0x1e; + const int id4 = 0x1f; +} +namespace ram { + const int ir1 = 0x04; + const int ir2 = 0x05; + const int T_ambient = 0x06; + const int T_obj1 = 0x07; + const int T_obj2 = 0x08; +} +} \ No newline at end of file