Skip to content

Commit 84984ce

Browse files
authored
Merge pull request #3 from adafruit/bot-driver-implementation
more tests
2 parents b815890 + 39f667d commit 84984ce

10 files changed

Lines changed: 778 additions & 243 deletions

File tree

Adafruit_AS7343.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,11 @@ uint8_t Adafruit_AS7343::getPersistence() {
632632
* @brief Set which ADC channel is used for threshold interrupts
633633
* @param channel ADC channel 0-5
634634
* @return true on success
635+
* @note Hardware testing shows this register does NOT affect threshold
636+
* comparison or persistence - comparison is always on CH0 regardless
637+
* of this setting. The datasheet claims SP_TH_CH controls the
638+
* persistence filter channel, but this behavior is not observed.
639+
* Register read/write works correctly; the value just has no effect.
635640
*/
636641
bool Adafruit_AS7343::setThresholdChannel(uint8_t channel) {
637642
if (channel > 5)
@@ -653,6 +658,8 @@ bool Adafruit_AS7343::setThresholdChannel(uint8_t channel) {
653658
/**
654659
* @brief Get the current threshold channel
655660
* @return ADC channel 0-5
661+
* @note See setThresholdChannel() - this register has no observed effect
662+
* on threshold comparison behavior.
656663
*/
657664
uint8_t Adafruit_AS7343::getThresholdChannel() {
658665
setBank(true);

examples/fulltest/fulltest.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ void setup() {
133133
Serial.print(F("Persistence: "));
134134
Serial.println(as7343.getPersistence());
135135

136+
// NOTE: Threshold channel register r/w works but has no observed effect
137+
// on threshold comparison - comparison is always on CH0 regardless.
136138
as7343.setThresholdChannel(0);
137139
Serial.print(F("Threshold Channel: "));
138140
Serial.println(as7343.getThresholdChannel());

0 commit comments

Comments
 (0)