user27914: I would like to be able to read the raw capacitive sensor values from a TTP229 chip through i2c in Arduino. I have one of these breakout boards to play with :

My goal is to get values similar to those of the MPR121 or the Capacitive Sensor Arduino library where the reading changes depending on proximity and how hard you touch the pads. I have tested the following code but I'm only able to detect an on / off reading.
#include <Wire.h>
#define ttp229 ( 0xAF>>1 )

uint16_t data_out = 0;
uint16_t data1, data2;
int count = 0;
boolean count2 = false;
int button[16];
int oldata[16];

void setup()
{
    Serial.begin( 9600 );
    Wire.begin(); 
}

void loop()
{
    Wire.requestFrom( ttp229, 2, true );
    //delay(1);
    while( Wire.available() )
    {
        data1 = Wire.read();
        data2 = Wire.read();
        data_out = (data1<<8)|data2;

        for(int i=1;i<17;i++)
        {
            uint16_t contrast = 0x8000;
            if(data_out & contrast)
            {
                //Serial.println(i);
                button[count]=i;
                count++;
            }
            data_out<<=1;    
        }
        if(count2)
        {
            switch(count)
            {
                case 1:
                if( oldata[0] == button[0] )
                {
                    Serial.println( button[0] );
                    delay( 20 );
                }
                break;
                case 2:
                if(oldata[0]==button[0]&&oldata[1]==button[1])
                {
                    for(int i = 0; i < 2; i++)
                    {
                        Serial.print( button[i] );
                        Serial.print("  ");
                    }
                }
                break;
            }
        }
        for( int i = 0; i < 16; i++ )
        {
            oldata[i] = button[i];
        } 
        count = 0;
        count2 =! count2;
    }
}

Even if i just print out data1 and data2 from the example it doesn't seem to produce readings that change with the capacitance. I originally thought this was a hardware limitation but then I came across this TTP229 product that has a linear touch sensor built into it.
Does anyone have any experience with this sensor and how I can access the raw readings?

user46440: mpr121 gives raw values
it has 12 electrodes/capacitance sensing inputs 
https://www.sparkfun.com/datasheets/Components/MPR121.pdf
https://github.com/BareConductive/mpr121/tree/public/MPR121/Examples/DataStream

27914: <p>I would like to be able to read the raw capacitive sensor values from a TTP229 chip through i2c in Arduino. I have one of these breakout boards to play with :</p>

<p><a href="https://i.stack.imgur.com/tCNKx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tCNKx.jpg" alt="enter image description here"></a></p>

<p>My goal is to get values similar to those of the MPR121 or the Capacitive Sensor Arduino library where the reading changes depending on proximity and how hard you touch the pads. I have tested the following code but I'm only able to detect an on / off reading.</p>

<pre><code>#include &lt;Wire.h&gt;
#define ttp229 ( 0xAF&gt;&gt;1 )

uint16_t data_out = 0;
uint16_t data1, data2;
int count = 0;
boolean count2 = false;
int button[16];
int oldata[16];

void setup()
{
    Serial.begin( 9600 );
    Wire.begin(); 
}

void loop()
{
    Wire.requestFrom( ttp229, 2, true );
    //delay(1);
    while( Wire.available() )
    {
        data1 = Wire.read();
        data2 = Wire.read();
        data_out = (data1&lt;&lt;8)|data2;

        for(int i=1;i&lt;17;i++)
        {
            uint16_t contrast = 0x8000;
            if(data_out &amp; contrast)
            {
                //Serial.println(i);
                button[count]=i;
                count++;
            }
            data_out&lt;&lt;=1;    
        }
        if(count2)
        {
            switch(count)
            {
                case 1:
                if( oldata[0] == button[0] )
                {
                    Serial.println( button[0] );
                    delay( 20 );
                }
                break;
                case 2:
                if(oldata[0]==button[0]&amp;&amp;oldata[1]==button[1])
                {
                    for(int i = 0; i &lt; 2; i++)
                    {
                        Serial.print( button[i] );
                        Serial.print("  ");
                    }
                }
                break;
            }
        }
        for( int i = 0; i &lt; 16; i++ )
        {
            oldata[i] = button[i];
        } 
        count = 0;
        count2 =! count2;
    }
}
</code></pre>

<p>Even if i just print out data1 and data2 from the example it doesn't seem to produce readings that change with the capacitance. I originally thought this was a hardware limitation but then I came across <a href="https://www.aliexpress.com/item/32787962371.html" rel="nofollow noreferrer">this TTP229 product</a> that has a linear touch sensor built into it.</p>

<p>Does anyone have any experience with this sensor and how I can access the raw readings?</p>
 46440: <p>mpr121 gives raw values
it has 12 electrodes/capacitance sensing inputs </p>

<p><a href="https://www.sparkfun.com/datasheets/Components/MPR121.pdf" rel="nofollow noreferrer">https://www.sparkfun.com/datasheets/Components/MPR121.pdf</a>
<a href="https://github.com/BareConductive/mpr121/tree/public/MPR121/Examples/DataStream" rel="nofollow noreferrer">https://github.com/BareConductive/mpr121/tree/public/MPR121/Examples/DataStream</a></p>
