Thanks, but I'm afraid that isn't my code That demo shows the speed of refresh but doesn't use the touch facility.OutoftheBOTS_ wrote: ↑Mon Apr 09, 2018 10:07 am@pythoncoder I just looked at your LCD160CR llibiary and this demo of it https://www.youtube.com/watch?v=OOz9U_YdstM
I am impressed.
My GUI is a simplified touch interface which allows you to create objects like pushbuttons, sliders, dropdown lists and suchlike. These respond visually to touch and run callbacks like a very stripped down version of a tablet/phone GUI. Alas I haven't made a video but there are some stills on the link above.
@grafalex
The comments about CPU cycles are valid. However if you opt for the uasyncio approach (which I recommend) the module is based around polling. You don't have any option to control its usage of CPU cycles. If, in the context of a uasyncio application, you choose to use interrupts to interface to a specific device the only thing you will gain is performance.
In terms of detecting 1s pulses you will have no problem whatsoever unless your coroutines are badly designed. For example if you issue pyb.delay(3000) in a coroutine you'll miss pulses because you're stopping the scheduler for 3s. Issuing await asyncio.sleep(3) will fix the problem. In a sensibly designed application I'd expect response times to a switch state change to be under 50ms. The underlying speed of uasyncio context switching on a Pyboard is well under 1ms. In practice latency depends on the degree to which individual coroutines hog the CPU.
I have based some fairly complex (for the Pyboard) applications around my GUI code. I've yet to encounter a situation where the response to pressing a screen object wasn't visually instantaneous.