#include<Wire.h> void setup() { // put your setup code here, to run once: Wire.begin(); Serial.begin(115200); } uint16_t result1; void loop() { // put your main code here, to run repeatedly: Wire.beginTransmission(0x00); Wire.write(0x2E); Wire.endTransmission(false); Wire.requestFrom(0x00,3); result1 =Wire.read(); result1 |=Wire.read()<<8; Serial.println(result1,HEX); }
啥也不说直接上代码。
注意默认地址为 005A 具体为啥看文档
标签:begin,Wire,读取,MLX90614,0x00,result1,code,i2c,your From: https://www.cnblogs.com/zyg01/p/17529495.html