Spork Schivago
Member
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:
Not really sure what to put for press there....if I can do that, then could I just call :
?
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.
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)
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: