APDS9999 Cancellation Test
--------------------------
APDS9999 found!
Testing Digital Cancellation (11-bit, 0-2047)...

Digital Cancel 0: PASS
Digital Cancel 100: PASS
Digital Cancel 500: PASS
Digital Cancel 1000: PASS
Digital Cancel 1500: PASS
Digital Cancel 2047: PASS

Testing Analog Cancellation (0-7)...

Analog Cancel 0: PASS
Analog Cancel 1: PASS
Analog Cancel 2: PASS
Analog Cancel 3: PASS
Analog Cancel 4: PASS
Analog Cancel 5: PASS
Analog Cancel 6: PASS
Analog Cancel 7: PASS

=== FUNCTIONAL TEST: Digital Cancellation Effect ===

Moving paper in front of sensor...
Baseline (cancel=0): 61
With cancel=10: 51
Digital cancellation reduces reading: PASS (reduced by 10)
With cancel=30: 31
Higher cancellation reduces more: PASS (31 < 51)

=== FUNCTIONAL TEST: Analog Cancellation Effect ===

Paper in front of sensor...
Baseline (analog=0): 61
With analog=2: 57
With analog=5: 51
Analog cancellation has effect: PASS (analog=5 51 < baseline 61)

Passed: 17 / Failed: 0
*** TEST PASSED ***
