- Basic I2C communication with byte-swapped register addresses - Chip detection via product code register - getProductID() function for 48-bit unique product ID - Test example sketch - GitHub CI workflow and clang-format configuration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
27 lines
No EOL
635 B
C++
27 lines
No EOL
635 B
C++
// Basic test sketch for Adafruit MLX90632 Far Infrared Temperature Sensor
|
|
|
|
#include "Adafruit_MLX90632.h"
|
|
|
|
Adafruit_MLX90632 mlx = Adafruit_MLX90632();
|
|
|
|
void setup() {
|
|
Serial.begin(115200);
|
|
while (!Serial) delay(10);
|
|
|
|
Serial.println("Adafruit MLX90632 test");
|
|
|
|
if (!mlx.begin()) {
|
|
Serial.println("Failed to find MLX90632 chip");
|
|
while (1) { delay(10); }
|
|
}
|
|
Serial.println("MLX90632 Found!");
|
|
|
|
uint64_t productID = mlx.getProductID();
|
|
Serial.print("Product ID: 0x");
|
|
Serial.print((uint32_t)(productID >> 32), HEX);
|
|
Serial.println((uint32_t)(productID & 0xFFFFFFFF), HEX);
|
|
}
|
|
|
|
void loop() {
|
|
delay(500);
|
|
} |