GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mcauser/micropython-ttp223: MicroPython examples using TTP223 capacitive touch module

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
docs
docs
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 

Repository files navigation

MicroPython TTP223

Using a TTP223 1-key capacitive touch module with MicroPython.

I was going to write a driver for this module, but it's pretty much just a drop in replacement for a push button. No driver needed.

The module features 3 pins, VCC, I/O and GND and has a red LED which illuminates when a touch is detected and the I/O pin goes HIGH.

It's sensitive enough to detect my finger around 3mm away from the touch pad.

demo

Examples

Basic usage

from machine import Pin
import time

d3 = Pin('D3', Pin.IN, Pin.PULL_DOWN)

while True:
    print(d3.value())
    time.sleep_ms(100)

Using interrupts

from machine import Pin

d3 = Pin('D3', Pin.IN, Pin.PULL_DOWN)
d4 = Pin('D4', Pin.IN, Pin.PULL_DOWN)

def touch(pin):
    print('Touched {}'.format(pin.name()))

d3.irq(touch, Pin.IRQ_FALLING)
d4.irq(touch, Pin.IRQ_FALLING)

Trigger mode

There are 2 pads A and B which can be bridged with a dab of solder to change the trigger mode.

Pad A Pad B Description
Open Open Momentary, High TTL level output (default)
Short Open Momentary, Low TTL level output
Open Short Latching, High TTL level output
Short Short Latching, Low TTL level output

Parts

  • VCC-GND STM32F407VET6 mini $15.47 AUD
  • TTP223 Capacitive Touch Module $0.22 AUD
  • Female-Female Dupont wires $0.64 AUD

Connections

STM32F407VET6 TTP223 Capacitive Touch Module
3V3 (or 5V) VCC
D3 (any pin) I/O
GND GND

Links

  • micropython.org
  • TTP223 datasheet

License

Licensed under the MIT License.

About

MicroPython examples using TTP223 capacitive touch module

Topics

capacitive-touch-sensormicropythonstm32f4ttp223

Resources

Readme
MIT license
Activity

Stars

10 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.