B4R Library rTTP229 - Capacitive Keypad

Wrapper for ttp229-arduino open source project: https://github.com/arduino12/ttp229-arduino

It works with Arduino and ESP8266.

Connections are explained here: https://github.com/arduino12/ttp229-arduino/tree/master/TTP229
It can work in 8 keys mode or 16 keys mode.

SS-2017-05-07_11.35.41.jpg


Example:
B4X:
Sub Process_Globals
   Public Serial1 As Serial
   Private ttp As TTP229
   Private d1pins As D1Pins
End Sub

Private Sub AppStart
   Serial1.Initialize(115200)
   Log("AppStart")
   ttp.Initialize(d1pins.D6, d1pins.D5, "ttp_KeyPressed") 'SCL pin and SDO pin
   ttp.Start8Keys
End Sub

Sub ttp_KeyPressed (Key As Byte)
   Log("Key down: ", Key)
End Sub
 

Attachments

  • rTTP229.zip
    7.9 KB · Views: 586
Last edited:
Top