Yohannfra / Touche

An open source and open hardware wireless fencing system
GNU General Public License v3.0
60 stars 12 forks source link

Support sabre #6

Open Yohannfra opened 3 years ago

Yohannfra commented 3 years ago

Issue tracker for sabre support

lmilekic commented 3 years ago

I'd be interested in helping add sabre support. What's the core issue that is stopping touche from supporting sabre currently?

Yohannfra commented 3 years ago

The limitation comes from how the capacitive touch library works. It mesure the capacitance by measuring the time needed to detect the voltage change from two pins (see : https://playground.arduino.cc/Main/CapacitiveSensor/).

For epee it just needs to read this value when the button is pressed but for foil and sabre it needs to keep reading this value all the time until it detects the touch, but since this takes a lot of time to do a read, it will slow down the whole system + the values won't be accurate.

I think this is not solvable with the arduino nano so these days I try to use the internal capacitive sensor of the ESP32 and if it doesn't work I'll try with a STM32 (It's used inside the Favero system).