Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
ahamilos

Junior Member
Registered:
Posts: 7
Reply with quote  #1 
Hi there!

I'm trying to track whether a button/lever is pressed with eyejoytrack. Eyejoytrack takes the following arguments:

ontarget = eyejoytrack('holdtouch', [OBJECT], digital_threshold, time_interval);

My question is how to give the function the digital input from my button. I defined the Button 1 as digital port 0 pin 0 on my DAQ, but how do I reference it in the timing file?

I tried making the button a TaskObject: TTL(0), but it seems TaskObjects are only for outputs?

Thank you!

<<<*** MonkeyLogic ***>>> Timing File Execution Error
Error using timing_v3_fewvars_runtime>eyejoytrack (line 949)
*** At least one requested Button has not been assigned to a DAQ object ***

Error in timing_v3_fewvars_runtime (line 119)

0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #2 
I don't think you can do that. You shouldn't route a digital signal to an analog input.

Take a look at this thread:
http://forums.monkeylogic.org/post/suggests-for-button-parts-7896086?pid=1291957916
0
ahamilos

Junior Member
Registered:
Posts: 7
Reply with quote  #3 
Thanks! According to the documentation, you should be able to define buttons with digital inputs:

holdtouchreturns when the button / lever input voltage falls below the specified threshold, or the specified duration has elapsedbutton(s) / lever(s)the voltage if analog, or 0.5 if digital0 if the input level falls below the threshold before the specified duration has elapsed, 1 otherwise.


However, how do you define the digital input as an object that you can pass to the function? This is missing from the documentation. Does anyone know?
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #4 
In case of buttons, you can place the button number to where the object number goes in eyejoytrack().
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.