Customer:
The recent Inkplate Arduino library added support for the PCAL6416AHF and I can now read the battery voltage. However, the library code excludes the code necessary to read the touch pads on the Inkplate 6 COLOR. Looking at System.cpp lines 46-81, the readTouchpad() function is wrapped in #if !defined(ARDUINO_INKPLATE2) && !defined(ARDUINO_INKPLATECOLOR), which excludes it from the build. Why was it excluded? When can I expect touch pad support to be included? I’ve also been waiting for the hardware files for the Inkplate 6 COLOR on your Git - when will they be available?
System.cpp lines 46-81:
#if !defined(ARDUINO_INKPLATE2) && !defined(ARDUINO_INKPLATECOLOR)
/**
* @brief readTemperature reads panel temperature
*
* @return returns temperature in range from -10 to 85 degree C with
* accuracy of +-1 in range from 0 to 50
*/
int8_t System::readTemperature() {
int8_t temp;
if (getPanelState() == 0) {
WAKEUP_SET;
PWRUP_SET;
delay(5);
}
Wire.beginTransmission(0x48);
Wire.write(0x0D);
Wire.write( );
Wire.endTransmission();
delay(5);
Wire.beginTransmission(0x48);
Wire.write(0x00);
Wire.endTransmission();
Wire.requestFrom(0x48, 1);
temp = Wire.read();
if (getPanelState() == 0) {
PWRUP_CLEAR;
WAKEUP_CLEAR;
delay(5);
}
return temp;
}
/**
* @brief readTouchpad reads touchpad pin to check if triggered
*
* @param uint8_t _pad
* touchpad pin to check
*
* @return value to indicate if touchpad is triggered (TRUE or FALSE)
*/
uint8_t System::readTouchpad(uint8_t _pad) {
return digitalReadInternal(IO_INT_ADDR, ioRegsInt, _pad);
}
#endif
Originally submitted via the contact form on soldered.com on 25 April 2023. Migrated to the forum for community visibility.