0

7" Touch Screen calibration
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

7" Touch Screen calibration

by DonTrustee on Tue May 24, 2022 11:49 am

Using BBB I got the 2396 - 7" Touch Display working (BBB login screen "beaglebone login:") but the red LED on the USB mouse breakout board is not on, USB cable plugged into the BBB. I went to your AR1100 Resistive Touchscreen help page and downloaded the configuration program in case the AR1100 is in no mouse mode. However the config program is in windows and I am running Ubuntu on my laptop. Is there a Linux version of the program? Tried running it in Wine but if did not like that. Am I right assuming the red LED on the breakout board is not on because it is in the no mouse mode?
Don

DonTrustee
 
Posts: 11
Joined: Fri Apr 15, 2022 11:52 am

Re: 7" Touch Screen calibration

by mikeysklar on Tue May 24, 2022 2:55 pm

Don,

The AR1100 configuration program is Windows only.

Is the USB mini-B cable a data cable or power only?

Does the red LED on the USB mouse controller illuminate when you touch the screen?

mikeysklar
 
Posts: 7752
Joined: Mon Aug 01, 2016 8:10 pm

Re: 7" Touch Screen calibration

by DonTrustee on Tue May 24, 2022 3:58 pm

Thanks for the quick reply Mike. I got the USB cable from Adafruit at the same time as the display. It is part no. 260, 3 ft. length. And no, the red LED does not illuminate when the display it touched.
Have a Blessed day!
Don

DonTrustee
 
Posts: 11
Joined: Fri Apr 15, 2022 11:52 am

Re: 7" Touch Screen calibration

by mikeysklar on Tue May 24, 2022 4:16 pm

Don,

Do you have a Raspberry Pi (not BBB) you can use to verify everything works correctly? That could make things easier when transitioning to your BBB setup.

mikeysklar
 
Posts: 7752
Joined: Mon Aug 01, 2016 8:10 pm

Re: 7" Touch Screen calibration

by DonTrustee on Tue May 24, 2022 4:22 pm

No, I do not have a pi to check the display with. I will dig up a Windows laptop to try and run the calibration code. Will let you know the result. Any further thoughts on your part will be appreciated.
Have a Blessed day!
Don

DonTrustee
 
Posts: 11
Joined: Fri Apr 15, 2022 11:52 am

Re: 7" Touch Screen calibration

by mikeysklar on Wed May 25, 2022 5:38 pm

Which distro are you running on your BBB?

Have you tried the recommended rpi-AR1100 utility?

https://github.com/tom-2015/rpi-AR1100

mikeysklar
 
Posts: 7752
Joined: Mon Aug 01, 2016 8:10 pm

Re: 7" Touch Screen calibration

by DonTrustee on Wed May 25, 2022 6:46 pm

Thanks again for the reply.
I am not at the work station right now, I got the BBB from Adifruit a few weeks ago so it is at or near the latest version. I see from the link you provided I could compile the configuration utility for Llinux, I thought it was Windows only. I will either get a Windows laptop or compile the code for the utility on my Linux laptop and will let you know the results. Hopefully tomorrow.
Have a Blessed day!
Don

DonTrustee
 
Posts: 11
Joined: Fri Apr 15, 2022 11:52 am

Re: 7" Touch Screen calibration

by DonTrustee on Thu May 26, 2022 2:07 pm

OK, got the ar1100 utility to run on a Windows machine, unplugged the USB cable fro the BBB that goes to the ar1100 and plugged it into the Windows machine. Windows is now connected to the ar1100 via USB cable. I went through the steps in https://learn.adafruit.com/ar1100-resis ... guide/help but when select 'Verify Communication' button I get "Error: Could not change mode to Mouse, Verify the ar1100 is properly attached". When I plug/unplug the ar1100 to the laptop's USB port no sound is heard, like the laptop does not see it. Also the red LED never comes on. The display is on and I can log in the the BBB with a keyboard so the display is working, just not the touch screen. Looks as if the ar1100 is dead. What next?
Have a Blessed day!
Don

DonTrustee
 
Posts: 11
Joined: Fri Apr 15, 2022 11:52 am

Re: 7" Touch Screen calibration

by DonTrustee on Thu May 26, 2022 2:22 pm

Ok ok, forget that last post. In fact this whole problem is operator error. The mini USB on the ar1100 board is very tight and I had not pushed in the cable with enough force to make a full connection. Now it is in all the way and the red LED is on and blinking when the utility is running on the laptop.
Question, when I remove the Windows laptop and plug the ar1100 into the BBB the red LED blinks but does not blink when the screen is touched as it did when connected to the pc. Why is that. Must there be code running in the BBB to read it to make it blink when touched? I have yet to write the code for the display and read the touch output.
Sorry for the bonehead mistake but know that I appreciate your help!
Have a Blessed day!
Don

DonTrustee
 
Posts: 11
Joined: Fri Apr 15, 2022 11:52 am

Re: 7" Touch Screen calibration

by mikeysklar on Thu May 26, 2022 5:45 pm

Don,

Thank you for sharing the solution. Good to know how snug the micro-b fit is.

The linux machine does need to have an AR1100 driver compiled in. Not all kernel builds have it by default. I believe it "just works" on the current releases of Pi OS. You can experiment with the microchip github link I dropped earlier in the thread as well to see if that changes the behavior.

mikeysklar
 
Posts: 7752
Joined: Mon Aug 01, 2016 8:10 pm

Re: 7" Touch Screen calibration

by DonTrustee on Fri May 27, 2022 11:29 am

One more question. I see the data from the USB port of the touch screen when touched in the file /dev/input/hidraw0 file. Do you have the data sheet that tells what format the data is in so I can decode it to see where the touch happened on the screen? I have not been able to locate such information on your web site.
Have a Blessed day!
Don

DonTrustee
 
Posts: 11
Joined: Fri Apr 15, 2022 11:52 am

Re: 7" Touch Screen calibration

by mikeysklar on Fri May 27, 2022 2:38 pm

Don,

This thread looks helpful for decoding hidraw0 input. It might be the same for any linux mouse data.

Code: Select all | TOGGLE FULL SIZE
struct input_event {
    struct timeval time;
    unsigned short type;
    unsigned short code;
    unsigned int value;
};


https://stackoverflow.com/questions/506 ... nput-event

The thread is using /dev/input/event1 in this case, but I suspect that is just a minor difference based on the distro and kernel version.

mikeysklar
 
Posts: 7752
Joined: Mon Aug 01, 2016 8:10 pm

Please be positive and constructive with your questions and comments.