Glide keyboard wackiness

I have been trying to learn how to use the Glide keyboard. I can get it do display when I click a text box, and I figured out how to check for the ‘Done’ a.k.a. return button being pressed, a.k.a. keyboard closing. What is driving me crazy is that it seems to misinterpret the position touched about 80% of the time. Yes, I have calibrated the screen and it works fine with the other controls I have tried except the keyboard.

For example if I tap the decimal point it might select ? or backspace or something else. When I say ‘select’ I mean that another key is drawn in the down position and that character may or may not show up in the textbox. Even if it draws the correct key in the down position I may or may not actually get it to display in the textbox.

Before I dig through the Glide source I was wondering if anyone else has run across this.

What display and touch type are you using?

I use Glide with the cap touch displays without any issues but I did have trouble with the keyboard on resistive touch panels and saw the same behavour as you are seeing.

I’m using the TE35 which came with the Spider2 kit. I’m not sure what technology the touch sensor uses. I noticed that Glide is using NETMF classes for the touch sensing. Perhaps there are some options there for better input filtering.

TE35 is a resistive touchscreen

Good point. The resistive driver doesn’t seem to like fingers too well. If you use a stylus or your finger it may be better?

I have tried a stylus and it is no better. The registered touch point is way to far off for the difference between a finger and stylus to be a factor. With a stylus I click on the backspace key and got a 6! I also suspect that the calibration would not work if the touch point was that far off what was expected.

If looks like you can set the touch scan time and that the points are passed in an array. Glide seems to just use element of the array, I’m not sure if there is more data after that or not. It might be a case of needing to filter the points passed back from the Spot.Touch driver?

I added a Debug.Print to GlideTouch::TouchEventArgs and I have another Debug.Print in my code telling me what key Glide thought was pressed. When pressing in the period key with a stylus I get things like the following:

touch: (178,153)
touch: (178,153)
touch: (178,153)
key: *
touch: (262,211)
touch: (262,211)
touch: (262,211)
key: .

As you can see the coordinates are not even close and this was touching with a stylus at the same spot twice in a row.

EDIT: *** Ignore this part upon further testing I do get wacky coordinates no matter what is displayed ***
It is odd though if the keyboard is not up and I click at the same spot on the screen where the period is it returns the correct coordinates (within an acceptable range) every time.

touch: (281,215)
touch: (278,213)
touch: (271,208)
touch: (264,203)
touch: (270,207)
touch: (280,215)

I have determined that this display is useless as far as touch sensing is concerned.

@ Jeff_Birt - Sounds like the calibration info is not being saved.

Even if the calibration was not being saved I think it would still return the same coordinates each time you tap the screen, even if the coordinate was not correct (i.e. not calibrated). Right now it returns coordinates that look right with one tap, tap again in the same spot and get coordinates that would be on the other side of screen.

I would presume that I would get some sort of warning or debug output is the calibration was not saved?

Spider 2 with TE-35 display

Does anyone actually have a TE-35 that works? I sent an email to GHI and they asked me to run some sample code, which I did and I told them that the recorded touch point might be 2mm off or 20mm off. Their response was, “Yeah, we have seen it up to 20mm of in our testing.” I find it hard to believe that every TE-35 they sell operates this badly.

I also asked if they were doing any sort of filtering on their touch driver in firmware and did not receive a response. The Spider2 and everything else in the kit works great, the touch part of the TE-35 really stinks. I might try an RC filter on the analog touch input lines to see if that helps (gleaned from a touch controller data sheet.)

Is there an alternative touch driver? I see that you can set the Spot.touch to use a managed driver.

@ Jeff_Birt - My TE35 works well but I use a stylus with mine. For Glide they don’t do anything special with Touch. It’s a simple implementation of the Microsoft Touch driver that bubbles things up.

I have tried with a stylus too, same results. Is there an alternative touch driver? What soft of input filtering does the MS touch driver do? The firmware has some impact as the generic MS driver has no clue how the touch signal is acquired, that has to be part of what GHI’s firmware does.

I’ve been puzzling on this a bit more and wonder if is related to:

  1. A2D on the Spider 2 (maybe it is noise prone)
  2. Touch driver algorithm used by GHI (maybe not oversampling and filtering properly)
  3. The resistive touch screen itself is defective or just stinks.

For #1 the only thing that could be done is to filter the analog signals. I noticed on a datasheet for a I2C touch controller chip that they show using a simple RC filter to help with noise. That would be easy to try.

For #2 there is nothing that a user could do as it is a firmware issue.

For #3 Providing that the touch sensor is not defective or just a poor design maybe a I2C touch controller chip can be used instead of the A2D on the Spider2. It would require a bit of a change to GHI’s Gadgeteer driver (to change to using a managed driver as I’m guessing there is not built in native method for reading I2C touch controllers.)

Dave M: I notice that the capacitive touch screens you like to use have I2C touch controller interfaces. How to you use them with NETMF (i.e. do you have your own managed driver code).

Jeff, I use a managed code driver that Simon wrote some time back but there there is a driver in codeshare from Skewworks that will work fine.

https://www.ghielectronics.com/community/codeshare/entry/1078

It is dead easy to hook these into Glide etc.

Thanks Dave, I drew up a simple filter board in Eagle yesterday. When looking through my spare parts I noticed I have a couple of old broken Panda2 LCDs which have an I2C touch controller chip on them. I’ll reclaim one of those and add it to my PCB layout such that I can jumper the analog signals directly to the Spider2 A2D or to the touch controller. That way I can try just the filter or the touch controller with or without the filter.