Coder Social home page Coder Social logo

Multitouch Kernel driver about hyperpixel HOT 5 CLOSED

pimoroni avatar pimoroni commented on July 19, 2024
Multitouch Kernel driver

from hyperpixel.

Comments (5)

Gadgetoid avatar Gadgetoid commented on July 19, 2024

I believe using the raw ADC values is the key to making a good driver, but you're right about ghosting. The trouble is that's the challenge- coming up with an algorithm, or touch recognition technique that takes it into account and compensates for it. The built-in two-touch recognition works, just about, but has some key weaknesses when recognising two touches that make gestures a little clumsy and make certain things - like the Pong demo and analog-stick spaceship demo I made for the official touchscreen - impossible.

As a tangent- the raw ADC values are extremely useful for triggering precisely placed controls. I managed to create a rough button driver that makes parts of the screen behave like a D-Pad and A/B buttons.

But I digress- I don't have any deep insight into how we'd solve the ghosting issue and recognise/track 2-4 touches with any degree of accuracy.

from hyperpixel.

procount avatar procount commented on July 19, 2024

I think I should walk before I run and concentrate on just creating a simple kernel driver, before I start looking at algorithms! But it's good background stuff.

(UPDATE: I found the pong and spaceship demos)

from hyperpixel.

Gadgetoid avatar Gadgetoid commented on July 19, 2024

They are part of python-multitouch, which is for the official Raspberry Pi 7" touchscreen- https://github.com/pimoroni/python-multitouch

Since HyperPixel is the same resolution, they should look fine but - if memory serves me - do not work particularly well at all.

from hyperpixel.

procount avatar procount commented on July 19, 2024

I've added support for the Hyperpixel display to PINN.
https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574&p=1309584#p1309584
No touchscreen support yet, but I hope to add that later when I find a bit more time.

from hyperpixel.

procount avatar procount commented on July 19, 2024

@Gadgetoid - OK, I'm back on creating a kernel touchscreen driver for the Hyperpixel 3.2.
I'm making good progress now that my driver loads, detects the touchscreen is fitted and can read the touch positions.

Do you have any more information on the following registers:

0x6e: interrupt settings - 0 0 0 0 EN_INT INT_POL INT_MODE1 INT_MODE2
0x6f?: interrupt width
0x70: power mode 0000 <- IDLE PERIOD, 1 ALLOW SLEEP 00 <- POWER MODE

particularly the interrupt modes.

I see your python driver uses:
EN_INT = 1 (Enable Interrupt?)
INT_POL = 1 (Interrupt Polling?)
INT_MODE1 = 1 (Interrupt mode 1?)
INT_MODE2 = 0 (Interrupt mode 2?)
and polls the interrupt line. What clears the interrupt line? Is it when you read from registers 0x40 onwards?
Do you know how to set this up for proper interrupt mode?
What are the other interrupt modes it supports?
I guess you have no idea about 0x6f (interrupt width) as you already put a question mark against it.

I don't see the HP 3.2 on your shop anymore. Is it discontinued now the HP4 is available?

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.