Welcome! Log In Create A New Profile

Advanced

Touchscreen Task with Tablet

Posted by marmosetlauren 
Touchscreen Task with Tablet
September 19, 2019 09:07AM
Hello!

I'm fairly new to using monkey logic, not new to MATLAB. Most of the program seems to be configured for eye tracking, however, I would like to project the task onto a tablet and use touch input. It seems as if most of the inputs must go through a DAQ, which I do plan to use for reward and other inputs but wouldn't be necessary for a touch task. Is there a simple way to make a standard delay match to sample task this way???
Re: Touchscreen Task with Tablet
September 19, 2019 11:15AM
You don't need a DAQ board for touch input. Also you can use Bluetooth to trigger reward devices.
https://monkeylogic.nimh.nih.gov/docs_MainMenu.html#OtherDeviceSettings
https://monkeylogic.nimh.nih.gov/docs_BluetoothRewardTrigger.html

NIMH ML is designed for two-screen setups, but there is a trick to run it on a tablet. Check on 'Forced use of fallback screen' on the main menu and type the size of your tablet screen in 'Fallback screen rect.', like [0,0,width,height].
https://monkeylogic.nimh.nih.gov/docs_MonitorSetup.html

You can find a DMS task made for touch input in the 'task\runtime v1\3 dms (touch)' directory.
Re: Touchscreen Task with Tablet
September 19, 2019 04:16PM
Thank you for your quick reply! This is very helpful!
Re: Touchscreen Task with Tablet
September 23, 2019 02:22PM
Hi there,

When trying to run the 3 dms (touch) demo from the task files, it will not register my touches. I checked the "touchscreen box" in the non-DAQ device settings toolbar, and the task works perfectly in simulation mode. When running non-simulation it works but does not respond to any touches. When ran on my computer with "forced use of fallback screen" it again doesn't respond to any clicks. Is there something I need to configure?
Re: Touchscreen Task with Tablet
September 23, 2019 11:56PM
I guess you did not change the screen size ("Fallback screen rect.") as I told you. (Do not use the simulation mode after you change Fallback screen rect., by the way.) With the simulation mode off, you are doing the task as a "real" subject, so you should touch the subject screen, not the control screen.

Touches and mouse clicks are not the same. Mouse clicks work as touches only during the simulation mode, whether you select "Forced use of fallback screen" or not.
Re: Touchscreen Task with Tablet
September 25, 2019 04:43PM
Hi,

Thanks for your reply.


Our tablet is attached to the control screen computer via a remote monitor app, and is recognized as a second screen, so using the fallback screen isn't necessary (although helpful!)

During simulation mode, the task works. During the non-simulation "real" mode, touches on the tablet subject screen do not register. I'm curious why this might be the case and how to remedy it.
Re: Touchscreen Task with Tablet
September 25, 2019 07:07PM
What is your tablet model? I don't understand what is the role of the remote monitor app here. It appears that your tablet is a stand-alone computer but you want to use it as a passive monitor.

Do you know if the tablet sends touch information back to the control computer? Check the system property of the control computer and see if touch is enabled (the first figure in the following link).
https://monkeylogic.nimh.nih.gov/docs_TouchscreenSetup.html
Re: Touchscreen Task with Tablet
September 26, 2019 11:33AM
We are using the Samsung Galaxy Tab A. Yes, you are correct we are not using it as a tablet per se but as a separate monitor to run the animals on. We would like to present them with the tablet screen to perform the task by touching it.

I realize after reading the link you sent that the issue is that the computer is not coding the responses on the tablet screen as touches but clicks instead, as it reads as a separate monitor without touch capability. Is there a way to construct a task that responds to this type of input? Our tablet isn't powerful enough to run the program by itself, although we may consider purchasing one with that capability if our current setup isn't feasible.

Thank you for all your help!
Re: Touchscreen Task with Tablet
September 26, 2019 05:10PM
You know that the Galaxy Tab is an Android device, not a Windows one. I have no idea how the remote monitor app bridges the gap between different OS, but at least it is certain that the tablet is not under direct control of the control computer. NIMH ML is not made for this kind of application.

If you want to keep the two-monitor setup, there are many touchscreen monitors on the market. Just buy one and connect it to the control computer as a second monitor. If what you want is a sort of mobile system that does not need to be attached to something, you can use a Windows tablet and run it as one monitor system as I explained above.
Re: Touchscreen Task with Tablet
September 30, 2019 09:29AM
Thank you for letting me know, I understand the issue now much more clearly. In this case, we may invest in a windows tablet.

Just out of curiosity, is there any way to write a task that responds to mouse clicks? It may prove useful for some of our other applications.
Re: Touchscreen Task with Tablet
September 30, 2019 12:01PM
If you use the scene framework, you can use the mouse_ tracker, instead of the touch_ tracker, and switch between them.
https://monkeylogic.nimh.nih.gov/docs_CreatingTask.html#RuntimeVersion2
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#Trackers

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.