- Add basic library structure with header and implementation files - Implement constructor, destructor, and begin() method - Add register definitions with doxygen comments - Include WHO_AM_I chip identification verification - Add basic test example sketch - Verified working on hardware with I2C address 0x5A 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
23 lines
No EOL
428 B
C++
23 lines
No EOL
428 B
C++
// Basic test for STHS34PF80 infrared sensor
|
|
|
|
#include "Adafruit_STHS34PF80.h"
|
|
|
|
Adafruit_STHS34PF80 sths;
|
|
|
|
void setup() {
|
|
Serial.begin(115200);
|
|
while (!Serial) delay(10);
|
|
|
|
Serial.println("Adafruit STHS34PF80 test!");
|
|
|
|
if (!sths.begin()) {
|
|
Serial.println("Could not find a valid STHS34PF80 sensor, check wiring!");
|
|
while (1) delay(10);
|
|
}
|
|
|
|
Serial.println("STHS34PF80 Found!");
|
|
}
|
|
|
|
void loop() {
|
|
delay(1000);
|
|
} |