Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Touchscreen not calibrated correctly?
souar
Newbie
Posts: 11
Permalink
Post Touchscreen not calibrated correctly?
on: May 16, 2016, 18:14
Quote

Hey,

I updated the firmware on the polargraph sd a few weeks back and its been running fine. The machine's sat still for a week, came back to it today and found the touch screen responding to being poked (tx light flashes when I touch it) but no button clicks are registering.

I presume its a calibration error since I've seen mention of it before but couldn't find any documentation on how to check/fix.

ohh and I tried the static trick but alas no luck.

Thanks!!

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Touchscreen not calibrated correctly?
on: May 19, 2016, 21:30
Quote

It's not uncommon to have the touchscreen work (in the sense that it is touchable), but the buttons not to get triggered - or the wrong buttons get triggered.

BUT! In my experience this is because the wrong touchscreen type has been specified in the firmware sourcecode.

Now, if yours worked fine, but then spontaneously stopped working, then that won't have happened, because I guess it's the same firmware both times.

If you connect to the machine using the serial monitor in Arduino IDE (or use the console in the Polargraph Controller app), what message do you see when you touch the screen?

sn

DaniK
Beginner
Posts: 34
Permalink
DaniK
Post Re: Touchscreen not calibrated correctly?
on: May 21, 2016, 11:23
Quote

not sure if that helps in any way, but I always had the touchscreen freeze when I happened to have a finger on the screen while I was plugging in the power. My wild guess is that basically everytime the touchscreen gets triggered before the servo motor has adjusted for the first time and the machine is "on" it freezes. (buttons don't work, but light flashes.)

(also with the firmware update from last November that fixed the touchscreen "off" thing)...but so far the "static trick" has fixed it everytime...

since I started plugging in the side that goes into the wall socket last it didn't happen anymore...(not sure if that's because my fingers are far away from the touchscreen or because of something else 😉

souar
Newbie
Posts: 11
Permalink
Post Re: Touchscreen not calibrated correctly?
on: May 31, 2016, 18:06
Quote

Hey,

Thanks for the reply's, sorry its taken a while to get back to you, been away with work.

I've plugged it into the controller and hit the motors on button and got this returned to me:

incoming: READY_200
incoming: touch ok: 0,114
incoming: 2: 0,114
incoming: Check for input
incoming: Inputted!!
incoming: process touch.
incoming: 3: 0,114
incoming: X:0, Y:114
incoming: Outlining.
incoming: Outlined!
incoming: button:216
incoming: DONE.touch ok: 0,114
incoming: 2: 34,84
incoming: Check for input
incoming: Inputted!!
incoming: process touch.
incoming: 3: 34,84
incoming: X:34, Y:84
incoming: Outlining.
incoming: Outlined!
incoming: button:32
incoming: Engaged motors.
incoming: finished start.
incoming: DONE.READY_200
incoming: READY_200

Ohh so I've just had another poke at the screen and it seems to be working now... I can only guess that it was the static issue but I somehow didn't fix it properly first couple of tries ha!

I'll run a drawing tonight and hopefully everything should be good, if not I'll drop another message here.

Thank you both for your help!

souar
Newbie
Posts: 11
Permalink
Post Re: Touchscreen not calibrated correctly?
on: September 4, 2016, 13:48
Quote

So this issue has reappeared, I recently moved the machine and it was down for a couple of weeks. When I came to bring it back to life I'm running into the exact same issue, the screen is registering touch and the console is showing the same as I posted previously so unless you say otherwise I'm presuming its the static issue again.

Any tips on fixing this? I've tried DaniK's suggestion of plugging the power supply in last but no luck so far.

Thanks!

souar
Newbie
Posts: 11
Permalink
Post Re: Touchscreen not calibrated correctly?
on: September 4, 2016, 17:41
Quote

I decided to run the Utouch Calibration and inputted the results into the UTouchCD file followed by compiling and uploading the sketch to the arduino. All went seemingly well except now the shield doesn't even detect touch (TX light doesn't flash and nothing in console in the controller).

One bit I'm slightly confused by is which of these should I be changing and remove from being a comment? I presume the 2.4in v2.1 since that's what my screen says on the pcb but it comes default as just the 2.4in?

// These calibration settings works with my ITDB02-2.2.
// They MIGHT work on your display module, but you should run the
// calibration sketch anyway.
//#define CAL_X 0x039281CCUL
//#define CAL_Y 0x03A2C1DEUL
//#define CAL_S 0x000AF0DBUL

// for the 2.4in screen
#define CAL_X 0x03CBC0C4UL
#define CAL_Y 0x03D901BEUL
#define CAL_S 0x000EF13FUL

// for the 2.4in v2.1 screen
//#define CAL_X 0x020E479FUL
//#define CAL_Y 0x00008000UL
//#define CAL_S 0x000EF13FUL

//#define CAL_X 0x00978201UL
//#define CAL_Y 0x00DC42E7UL
//#define CAL_S 0x000EF13FUL

Anyway slightly panicked I thought okay just use an old hex and roll back to that with xloader, did that but still got the same problem, nothing is registering. I also just tried the hex from when you fixed the USE_LCD issue and still nothing (although that version comes with a calibrate button?)

I know the screen works because I've run the calibration a couple of times successfully which means I'm getting something wrong with what I'm doing with the polarshield code. I've changed nothing but calibration variables though so I'm a bit stumped...

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Touchscreen not calibrated correctly?
on: September 4, 2016, 19:06
Quote

The good news is you can't really "break it" with firmware - at least I've never managed it.

The bad news is I've still never figured out what the touch-not-working problem is. It works mostly. When it doesn't, the static reset trick mostly solves the problem. When it doesn't, then ... well, it usually works the next day. (I know that's not much help.)

The other screen adjustment you might need to make is the LCD_TYPE setting:

https://github.com/euphy/polargraph_server_polarshield/blob/master/polargraph_server_polarshield.ino#L58-L63

There's been two generations of 2.4" screens, you should try the older setting (ITDB24E_8) ... I think. It's been a while since I've looked at that.

To be clear, when I describe the touch-not-working problem is when the touch just doesn't register at all. No flashing light or nothing. That's what I don't know how to solve reliably.

When you get the light flashing on touch (but nothing working when you do touch), then it's normally a mis-calibration issue, and that's what you can fix with changing your UTouchCD.h and polargraph_server_polarshield.ino.

sn

souar
Newbie
Posts: 11
Permalink
Post Re: Touchscreen not calibrated correctly?
on: September 6, 2016, 10:48
Quote

So of course I plugged it in yesterday and it worked fine...

Odd that the grounding trick doesn't seem to be doing it for me but nice to have the machine back and its something to keep an eye on in the future,

Do you know whether its an issue unique to the screens and polarshield together or have you heard of the issue when the screens used in other applications?

Was also an interesting journey into the code, I have largely no experience or knowledge with C but muddling my way through things like the calibration started to paint a clearer image of how it works. Makes me a little less daunted by the idea of fiddling about more.

Thanks!

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Touchscreen not calibrated correctly?
on: September 6, 2016, 21:18
Quote

It's very frustrating, I know. I believe the problem is to do with the way the polarshield handles the power. Something to do with the state of the board during the startup phase gets it upset.

This is based on almost no evidence, beyond some speculative chats with People Who Know Things, and the rash assumption that it can't be something that affects everything with these LCDs.

I've tried experimenting to diagnose the issue, but with no luck. The problem is too hard to replicate, and too random to solve!

There's nothing clever in the code - but there is a lot of stupid in it 🙂

sn

souar
Newbie
Posts: 11
Permalink
Post Re: Touchscreen not calibrated correctly?
on: September 9, 2016, 15:13
Quote

The problem is too hard to replicate, and too random to solve!

I think that sums it up perfectly ha!

It seems to occur most frequently when the machine has been sitting idle and disconnected for a while, during constant operation I don't seem to ever encounter the issue. Oh well it works now and I know roughly what to do in the future so I'm happy ha!

I believe it's all a matter of perspective, I for one rather marvel at your ability to have conceived and executed the polargraph. Whether messy or not it works and it's enough to leave anyone I show it working to or the fruits of its efforts amazed!

Anyway I don't think anyone here bought/built one of these thinking its going to be a perfect working finished product, in fact I think most of us secretly look forward to when it goes tits up.

Till the next issue and thanks for your work, you've given a man void of artistic talent a nice little outlet.

Nick

souar
Newbie
Posts: 11
Permalink
Post Re: Touchscreen not calibrated correctly?
on: February 13, 2017, 12:27
Quote

I hate to bring this back but I'm stumped again.

It's still the same issue, running latest firmware. Touching the screen is registered and I can see the same messages on the serial monitor, sometimes a button will register a click but its rare and I'll never be pressing that button but just somewhere on the screen nearby.

I ran the calibration and entered the values into UTouchCD.h, I've also checked I've got the right screen selected #define LCD_TYPE TFT01_24_8 (I tested it with the others but just get a white screen so not that).

Gone through the static trick and leaving it a day as well but sadly still no luck.

Any other suggestions? I can still use it hooked up to a pc but that's by no means an ideal solution

Cheers,

N

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.024 seconds.