Simple test
Ensure your device works with this simple test.
examples/max44009_simpletest.py
1# SPDX-FileCopyrightText: Copyright (c) 2026 Tim Cocks for Adafruit Industries
2#
3# SPDX-License-Identifier: MIT
4"""
5Adafruit MAX44009 Simple Test
6
7Basic example for the Adafruit MAX44009 library.
8Reads ambient light lux values.
9"""
10
11import time
12
13import board
14
15from adafruit_max44009 import MAX44009
16
17print("Adafruit MAX44009 Simple Test")
18
19sensor = MAX44009(board.I2C())
20
21print("MAX44009 Found!")
22print()
23
24while True:
25 print(f"Lux: {sensor.lux:.2f}")
26 time.sleep(1.0)