Teensy 4.0 and USB Touchscreen example no response on Windows 10

Status
Not open for further replies.

mocher72

Member
I am looking at using the Teensy 4.0 to convert some input signals into a multi finger touchscreen input.
I do see the press echod in the serial monitor.

I have tried the TenFingerCircle example code included with the Teensyduino installation.

I have USB type set to "Keyboard + Mouse + Touchscreen"

Installation:
Arduino version 1.8.12
Teensyduino v 1.52-beta2

Running on Windows10.

I see no touches, also the website in the demo does not work
http://www.repaa.net/draw.html

I also have a Asus ZenScreen Touch which does work OK.

Code:
/* USB Touchscreen, Ten Finger Circle Example

   When a button is pressed, Teensy sends a sequence of
   touchscreen presses for 10 fingers simultaneously
   drawing ten 36 degree arcs, which form a circle.

   This example is meant to test whether your computer
   can properly handle multi-touch with 10 simultaneous
   points.  If you encounter problems, please run the
   simpler SingleFingerLine example.

   A pushbutton needs to be connected between pin 14 and GND.
   Or a wire or paperclip may be touched between GND and pin
   14 to start the drawing.

   To see the result, open this page with Goolge Chrome:
   http://www.repaa.net/draw.html

   After pressing the button 5 times, you should see this:
   https://forum.pjrc.com/attachment.php?attachmentid=12750&d=1516978091

   This example has been tested on Windows 10 and Ubuntu 14.04.
   Macintosh High Sierra 10.13.2 does not work, and also does not
   respond properly to a Dell P2314T touch-enabled monitor.

   You must select Touch Screen in the "Tools > USB Type" menu

   This example code is in the public domain.
*/

#include <Bounce.h>

Bounce mybutton = Bounce(14, 10);
int yoffset = 8000;

void setup() {
  pinMode(14, INPUT_PULLUP);
  TouchscreenUSB.begin();
}

void drawcircle(int x, int y) {
  float arc = 2.0 * PI / 10.0;
  float r = 3000.0;
  for (float angle=0; angle < arc; angle += 0.01) {
    for (int i=0; i < 10; i++) {
      float ph = arc * (float)i;
      TouchscreenUSB.press(i, r * cosf(angle+ph) + x, r * sinf(angle+ph) + y);
    }
    delay(10);
  }
  for (int i=0; i < 10; i++) {
    TouchscreenUSB.release(i);
  }
}

void loop() {
  mybutton.update();
  if (mybutton.fallingEdge()) {
    Serial.println("press");
    drawcircle(16000, yoffset);
    yoffset += 4200;
    if (yoffset > 24000) yoffset = 8000;
  }
}

Any clues what to troubleshoot?

If needed I can run USBlyzer and capture some messages from the Teensy and compare with the Asus ZenscreenTouch

Sean
 
Windows 10 has serious problems with two multitouch screens connected. Usually it accepts only the first one it sees and the second one is ignored.
 
Windows 10 has serious problems with two multitouch screens connected. Usually it accepts only the first one it sees and the second one is ignored.

I do not have both the Zenscreen Touch and the Teensy connected at the same time.
When I have the Zenscreen Touch plugged in I am able to select which screen to associate with the touch functionality by entering the Tablet Mode setting in control panel. With the Teensy plugged in, although a HID touchscreen device is recognised in device manager I am not able to access Tablet mode setting as this is not available. So maybe there is something not correct with the USB enumeration?
 
Hi,
I'm trying also to use USBHost of a TEENSY 3.6 as a Touchscreen input. Screen : ASUS VT207
I'm using the TECHTOY HDMI board which displays very nice.
But no response from the USBHost. However, it runs nice with a 10" Buydisplay screen.
Another question : why it is not possible to choose USB serial + Touchscreen + MIDI ?
Thanks for your help !
Hoping PJRC will launch soon a TEENSY 5 with GPU ! Or an HDMI shield as TECHTOYS with a running USBHost Touchscreen capability ! With such a board, many developpers could replace PC's and WINDOWS !
 
Same thing here on Teenssy 4.1, not working on Windows 10, then i gave it a try on Ubuntu20 and on Android device, surprisingly it works just fine on Android, ubuntu only single touch works:(
 
NEED CONTIGUOUS 3x8 bits and HDMI-USB host input running.

Same thing here on Teenssy 4.1, not working on Windows 10, then i gave it a try on Ubuntu20 and on Android device, surprisingly it works just fine on Android, ubuntu only single touch works:(

Hello Paul,

I purchased hundreds of 3.2 but only one 3.6 and one 4.0 ONLY for testing. Why : only because except the 3.2, there are no contiguous, complete 8 bits input output ports ! And the 3.6 don't manage USB/TOUCHSCREENS for standard HDMI Touchscreens.
I need always a platform for real time professional musical applications with HDMI output (maybe coupled with the nice Techtoys HDMI shield)and USB touchscreen input running.
If you are developing a new TEENSY, can you provide such functionnalities ?
I'm ready to help you for this.
Best regards,

Pascal
 
Pascal - T4.1 does have more contiguous IO pins for example:
For example I played around with CSI camera using DMA using pins (22,23,20,21,38, 39, 26,27) Port1(6)24-31
When I was playing with it there, I used the upper bits where my bits were defined in reverse order 6:31 was my LSB, ...
Then when the DMA completed, I used: uint8_t b = __RBIT( buffer);
To reverse the 32 bit word read in by DMA into the 8 bits from the camera (reverse the bits)...

As for Touch... Again as for HDMI touch screen, I believe we had some of this conversation earlier...
The problem is that for example I don't have any of these screens, nor as one who is only doing this stuff for the fun of it (i.e. just another customer), probably won't rush out and buy one...

So best thing we can do is for someone who has one to try to provide as much debug information as possible, possibly both from plugging into Ubuntu and get as much debug data as possible.

Stuff I often look at from Linux:
lsusb - both simple as well as the -v of the specific device.
I often use a hid dump... I probably should localize all of the data for how to do this somewhere:
Example output is in the thread: https://forum.pjrc.com/threads/4562...-Keyboard-LEDs?p=155132&viewfull=1#post155132

I thought I did have some notes on how I installed these tools... But not seeing it right yet.

Edit I also meant to say that if you have T3.6 or T4.x setup with USB Host support, you can try plugging your USB into the host with maybe the sketch:

HidDeviceInfo
And see what information this prints out when you plug your device in and maybe when you touch the screen...

As part of this you may want to turn on debug printing in this library as well:
go to USBHost_t36.h and uncomment the line: //#define USBHOST_PRINT_DEBUG
 
Hello Kurt,
I turned on debug printing. At present, all is OK up to the periodictable = 2001C000
After, isr interrrupt is enabled. But the isr interrupt is never reached when I hit the screen.
Thanks for your help !
Pascal
Here are the last infos I receive with the println:
USB Host Testing
960
USBHost.begin
sizeof Device = 36
sizeof Pipe = 96
sizeof Transfer = 64
power up USBHS PHY
reset waited 5
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 2001C000
periodictable = 2001C000
 
Status
Not open for further replies.
Back
Top