Capacitive Buttons on ESP8266 with Arduino IDE
Posted:
Thu Jun 25, 2015 9:44 am
by juanpintom
Hi all!, I trying to make it working a capacitive touch button to replace/add it on my wall light switches, I maded this with an Arduino and Capsense Library, but I think I found a simple sketch to make it working. The problem it's a LUA based sketch
and my knowledge about LUA its very limited. Here is the post (Ty to Gabi Mihai):
http://www.esp8266.com/viewtopic.php?f=11&t=3720&p=21617#p21617Here is the actual (no tested) sketch using Ticker. I need to do more tests (soon)
http://pastebin.com/a0cYn9fZAny help is appreciated
Regards
Re: Capacitive Buttons on ESP8266 with Arduino IDE
Posted:
Thu Jul 02, 2015 11:11 am
by juanpintom
Finally I've done this with this simple code, simple touch, long touch (with repeat option)
http://pastebin.com/6basHByUIt have a delay of 50ms but can be changed to a ticker timer, I don't care about why on the next example the Souliss library takes control of timming and call the Function every 50ms without delays.
Here is the Souliss Example, with this we've Capacitive buttons on Souliss!!
https://github.com/juanpintom/Souliss_ESP_Examples/blob/master/E08_ESP_Capacitive_SensorRegards!
Re: Capacitive Buttons on ESP8266 with Arduino IDE
Posted:
Thu Jul 09, 2015 5:11 pm
by tytower
I've opened a couple of issues on your git hub page but you have not responded to either yet.
I asked about GPIO0 and GPIO2 and maybe a typo and also what are you doing with pin 15 and how are you doing it ?
As I said there have you actually got this code up and running yet or is it just a development .
Thanks for the code btw.
Re: Capacitive Buttons on ESP8266 with Arduino IDE
Posted:
Fri Jul 10, 2015 8:34 am
by juanpintom
Hi tytower! Sorry, I forget to enable notifications on Github :S
I just connect GPIO0 to GND when Im uploading an sketch from Arduino IDE, before it's loaded I left free.
GPIO15 must be PullDown on the start,then you can use to other purposes, I connected GPIO15 to a TIP122 to control a Led Strip. Take care I use an Adapter with an ESP12 that have a Pulldown resistor on GPIO15.
About the capacitive code IM working on it, I get it working but I need to avoid some bad readings (sometimes reads < thresold when foil is touched) I think is caused by the timming with no delays related with Souliss. The code from Pastebin works well.
I come to github now... again sorry by the late response.
Regards.