First of all thanks a lot for this forum in which I found all answers now by reading through the replies. I am a mechanical engineer (41) and realized several hobby RPI projects up to now.
But now I am stuck: I have a FDC2214 capacitive sensor I want to connect to the RPI via I2C. I am an absolute I2C newbie and already struggle with the wake-up command.
The datasheed says:
When the FDC powers up, it enters into Sleep Mode and will wait for configuration. Once the device is
configured, exit Sleep Mode by setting CONFIG.SLEEP_MODE_EN to b0.
Device address is: 0x2A
Config register is: 0x1A
CONFIG.SLEEP_MODE_EN is on bit 13
What I did for trial is this:
Code: Select all
onmode = bus.read_byte_data(0x2A, 0x1A) print "onmode: ", onmode bus.write_byte_data(0x2A, 0x1A, 0) onmode = bus.read_byte_data(0x2A, 0x1A) print "onmode: ", onmode
My problem: The write method only allows to enter the address and register (and value) but no bit. How can I specify the bit I need to set? Or am I completely wrong?
Anyone an idea or a link where I can find an explanation. All the tutorials I went through did not answer this question yet....
Thanks in advance for any support.