Need help having Teensy 3.6 press on a touch screen.

Status
Not open for further replies.
Hi.

I have a Teensy 3.6 board and I'm using the TeensyDuino stuff to program it. I've written code so it sends stuff through the USB port. In the Arduino IDE, I've selected Keyboard / Mouse / Touchscreen for USB Type.

I hook my board to a cell phone and I'm trying to prevent the screen from going to sleep. All I want to do is have it act as if I'm touching the screen, just pressing down on it and then letting go.

I've looked at the usb_touch.c source file, but I'm having trouble understanding it.

Can I just call something like usb_touchscren_press(1, 50, 50, <something>); ? I see the prototype for usb_touschscreen_press is:
Code:
void usb_touchscreen_press(uint8_t finger, uint32_t x, uint32_t y, uint32_t press)
Not really sure what to put for press there....if I can do that, then could I just call :
Code:
usb_touchscreen_release(1);

?

I was thinking finger is the number of fingers I want pressed down, which is just one. Essentially, I just want to tap the screen, that's it. Could someone please help me figure out how to accomplish this? I've already set the screen size and successfully can move the mouse and everything.

**EDIT: I no longer need help with the touchscreen stuff, I figured out how to accomplish what I wanted using the mouse functions. But for future reference, if anyone wants to point me to where I can find some examples or shed some light on this, I would greatly appreciate it.

Thank you.
 
Last edited:
the touch is indeed limited, i too used the usb mouse functions to pull data from i2c touch chip to control a remote host, supports double touch on 6-wire resistive panel, pressure touch, zoom and scroll ability, i still have to find a way how to calculate scrolling (double touch side-by-side motion) based on moving x/y axis movement, pressure is 9-0, and zoom is 0-10 (double touch pinching method)
 
Last edited:
the touch is indeed limited, i too used the usb mouse functions to pull data from i2c touch chip to control a remote host, supports double touch on 6-wire resistive panel, pressure touch, zoom and scroll ability, i still have to find a way how to calculate scrolling (double touch side-by-side motion) based on moving x/y axis movement, pressure is 9-0, and zoom is 0-10 (double touch pinching method)

Thank you. I was thinking maybe I was doing something wrong. If the touch functions aren't fully developed, this could explain why I had so much difficulty using them. I appreciate you taking the time to respond to my question.

Thanks!
 
Status
Not open for further replies.
Back
Top