Beispiel #1
0
try:
	print '\nThank you for choosing MouselabRig. We hope you find this experience' \
	 'enjoyable.\nIf you didn\'t update the parameters for this experiment, quit ' \
	 '(CTRL-C) and do so now.\n'
	begin = raw_input('Ready to begin? (Y/N) ')
	if (begin == 'Y') or (begin == 'y'):
		pass
	else: 
		sys.exit('Have a nice day.')
except KeyboardInterrupt:
	sys.exit('\nBe back soon!')


print "Firing up the arduino"

arduino.resetArd()

print "ready"


try:
	while arduino.isOpen():
		
		arduino.requestMsg()

		if arduino.inWaiting():

			data.parseMsg()

			data.displayData()
			arduino.sendMsg = True