View Single Post
  #9  
Old 01-21-2010, 09:39 AM
ursi ursi is offline
Member
 
Join Date: Dec 2009
Posts: 11
Hi,

I can now feed in 'my' voltage from the external source and print just the voltage output. So, that works fine, thanks.

But it prints the result still every second, so the if-condition does not seem to work properly...


Code:
def ExtTrigg():
	print 'trigger > 2.0'


###+++++++++++++++++++++++++++
def checkTrigger():		
	trigg = d.eAnalogIn(0) # AI0
	if trigg > 2.0:
		ExtTrigg()
		print trigg['voltage']

vizact.ontimer(1, checkTrigger)
Another question: can I chance the code, so that the frequence for checking the trigger would be higher than once a second?
Reply With Quote