Adafruit_Seesaw
Adafruit_Seesaw copied to clipboard
Calling digitalReadBulk before analogRead causes analogRead to return 1024
This is a minor issue and may be hardware-dependent. If you call digitalReadBulk()
immediately before calling analogRead()
, the analogRead()
will almost always return 1024. Adding delay(1);
between the commands fixes the issue. In Adafruit_seesaw.cpp, there is a delay at the end of the analogRead()
functions, but not digitalReadBulk()
.
- Feather RP2040 with RFM95 LoRa
- Joy FeatherWing
- Arduino IDE version: 2.2.1
Steps to reproduce:
- Open joy_featherwing_example.ino
- Move ss.digitalReadBulk(button_mask) to just before ss.analogRead(2)
void loop() {
uint32_t buttons = ss.digitalReadBulk(button_mask);
int x = ss.analogRead(2);
int y = ss.analogRead(3);
....
}