Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TouchPin Examples
#1
Hello All,

I am trying to get a TouchPin input to work with and IRQ.  Is there a way to do this?  I have tried a bunch of different things with configuring the input pin to the TouchPin constructor but it just wont work.

What I am after is I don't want to have to poll the touch pins for input in my main method.  I would much rather fire off an interrupt.  Is this possible?

Thanks.
Reply
#2
Here's an example in C:
https://github.com/espressif/esp-idf/tre..._interrupt

I don't know if this functionality has been implemented in MicroPython yet.
Reply
#3
The touch support is the same as in the official MicroPython, no interrupts and callbacks are available.

It should be simple enough to implement, I'll try to implement it when I find some time...
Reply
#4
(01-15-2019, 08:45 PM)lobo Wrote: The touch support is the same as in the official MicroPython, no interrupts and callbacks are available.

It should be simple enough to implement, I'll try to implement it when I find some time...

That is great.  I found a few other examples of talking about it but never really saw it completed.  I am new to the micropython codebase but if you wanted to give me a few tips on getting started I would try to give it a shot on implementation. 

I am using your codebase on a badge I am doing for a conference and want to use touch inputs (pcb) in the place of buttons.  Should be cool

Thanks for all or your hardwork lobo.

Riley
Reply
#5
I actually need to do it for my own needs, as I've recently designed a board with ePaper display and touch keypad...


Attached Files Thumbnail(s)
       
Reply
#6
I had this exact same interest (touch-driven interrupts), and couldn't implement this in mainline MicroPython. Did this even get implemented in this port?

Loving telnet/ftp/mDNS capabilities btw!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)