Coder Social home page Coder Social logo

Multitouch support about hyperpixel HOT 8 CLOSED

pimoroni avatar pimoroni commented on July 19, 2024
Multitouch support

from hyperpixel.

Comments (8)

Gadgetoid avatar Gadgetoid commented on July 19, 2024

I have some example code somewhere in the form of a custom driver that can read more than 2 touches, but the display is small enough that 2 is really the practical limit. Any more and it becomes tricky to distinguish between individual fingers, since - iirc - the sensor only has something like 14 vertical lines and 7 horizontal.

from hyperpixel.

bahamut657 avatar bahamut657 commented on July 19, 2024

Can u post some example code for enabling multitouch plz?
Another thing with only 2 finger is:

  1. start touch with finger A in position X,Y (near the top right side of the screen)
  2. after a while start touching with finger B in position X-500, Y+200 (mantaining the finger A pressed)
    => Sometimes in the second touch arrive the X or the Y of the first finger

from hyperpixel.

Gadgetoid avatar Gadgetoid commented on July 19, 2024

Found it, at least this is how far I got: https://gist.github.com/Gadgetoid/64e57db4a22e4cd585ad35c6be2c7682

from hyperpixel.

bahamut657 avatar bahamut657 commented on July 19, 2024

I tried your code...but it seems to work better the original one.
With this new code, mantaining pressed a finger then pressing with the second one some point in the screen happens:

  1. Sometimes touchend was triggered on the first finger (even if mantained pressed)
  2. The second finger hit has sometimes the wrong X or Y
  3. Is it possible to create a stable software managing at least 2 fingers?
    I found an example in the Internet(managing indefinitely fingers and also simplifies the implementation)..Could we apply this to hyperpixel-touch script?
    In case, I'm available to help you developing this piece of code if you want (this screen is wonderful but we need a stable driver for touchscreen)
    The example code is in the attached file
    hyperpixel-touch-more.txt

Regards,
Jacopo

from hyperpixel.

Gadgetoid avatar Gadgetoid commented on July 19, 2024

The attached code looks like another test I put together, where did you find it? I'm usually so buried under SD cards that these things go astray.

It had a problem, though; the relationship between reported touch ADC value, and distance to the actual row or col on the screen is not linear so as I moved my finger across the screen the position would accelerate and decelerate as it moved closer to/further away from each electrode. I need to find an algorithm that would map the nonlinear response of the ADC to a position between any two electrodes.

It also does not properly track touches, so a single touch at x=300,y=300 would be recognised as "Touch 1", but if you then touch at x=150,y=150 that would replace "Touch 1", and the original "Touch 1" would become "Touch 2."

from hyperpixel.

bahamut657 avatar bahamut657 commented on July 19, 2024

I found it on the Internet but it does communicate with EVDEV hooks. It is nice to know that the author is you 👍
I think we can inspire to Android
http://www.masonchang.com/blog/2014/8/25/androids-touch-resampling-algorithm
or there from CYPRESS
http://www.cypress.com/file/134996/download
Make me know if it is ueful and if I can help you.
Regards,
Jacopo

from hyperpixel.

Gadgetoid avatar Gadgetoid commented on July 19, 2024

I've put together a basic pygame app for getting a better idea of the touch data and recognition. You can find it here: https://gist.github.com/Gadgetoid/8bc3bbbd64d7f96f585920eb1ef6abde

Unfortunately it's shown just how many bugs are in my current detection, it's pretty poor. It also makes no effort at all to actually track fingers across the screen, it just recognises raw points of touch which results in all sorts of problems.

from hyperpixel.

bahamut657 avatar bahamut657 commented on July 19, 2024

Thanks, I will try it soon

from hyperpixel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.