By the looks of it, that is an I2C device, right? So you will not be able to run that from inside the render()
function. You will have - instead - to run it from a separate thread, what we call an AuxiliaryTask
.
If you are writing in C++, a good starting point is the relevant example in 06-Sensors/capacitive-touch
(on the board or online) .