0

Trinket M0 and Capacitive sensing
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trinket M0 and Capacitive sensing

by the_ocho on Wed Mar 20, 2019 12:06 pm

I've been using the older trinket 5v for a long time to make cap sensing switches.

Is it possible to use the hardware cap sensing pin (#3) on the Trinket M0 in the same way (using it as a sensor, and being able to adjust its level of sensitivity)?

My old go-to was a 5v trinket and using the CapactitveSensor library - https://github.com/PaulStoffregen/CapacitiveSensor . By balancing out resistors and sensing levels, I could make reliable switches that acted through non-conductive materials (like behind a wood panel, or behind a painted acrylic screen for example).

I tried using the library on the Trinket M0 and it's not compiling, I'm assuming because of the hardware architecture.

Any help would be appreciated - thanks!

the_ocho
 
Posts: 19
Joined: Sun Aug 09, 2015 6:50 pm

Re: Trinket M0 and Capacitive sensing

by XRAD on Wed Mar 20, 2019 8:28 pm

have you tried the Adafruit 'touch' lib version? Works great with hallowing. I do not know if the TM0 pins are set with same resistors(Ie: added to the hallowing board? or built into chip?, but they both run same processor..so it would seem that 3 pin touch control/capability on the TM0 would be possible using this lib.. ..... might want to give it a shot..

https://github.com/adafruit/Adafruit_FreeTouch

Also, a cool build for awesome TM0 touch control:

https://github.com/andyclymer/kerntroller

XRAD
 
Posts: 532
Joined: Sat Nov 19, 2016 3:28 pm

Please be positive and constructive with your questions and comments.