Is there a simple way to use the 16 key touchpad (TTP229) with Particle?

If you use Serial.print(val, BIN); you’ll see the binary representation.

And your keypads have the numbers [0] and [1], printing [2] will show you the contents of the memory location following the reserved space (= not your btnState)
Arrays in C always start with index zero!

1 Like

OK, I see!

I changed the print commands to:

Serial.print(btnState[0], BIN);
Serial.print(" - ");
Serial.println(btnState[1], BIN);

Now I see this in the serial monitor:

________________|____________T___
0 - 1000000000000
______T_________|________________
1000000 - 0

One step forward…

1 Like

How to Chang ttp229 address in i2c ?or how to identify two ttp229 device on i2c protocol ?

Did you read this?

You need to check whether you are using the -L or the -B version of the chip.

1 Like

Now i am connect to ttp229 to digispark(attiny85) and digispark to arduino using i2c communication. So that i connect
More than one ttp229.any other options than plz guide me.