Programming a Kill Switch
Page 1 of 1

Author:  fmcwhirt [ Tue Feb 23, 2016 11:44 am ]
Post subject:  Programming a Kill Switch

We are using a program to create a AGV for the PLTW POE Course. We are having issues with the programming.


1) Press Bumpswitch
2) Motor on Full (+) for time of 5 sec
3) Stop Motor
4) Press Bump Switch
5) Motor on (-) Full for time of 5 sec.
6) Stop Motor

This program continues until BUMP SWITCH IS PRESSED AND HELD FOR 3 SECONDS TO KILL PROGRAM. This is where we are having the issue, the Kill Switch. Any thoughts would be great?

Author:  Coder A [ Tue Mar 08, 2016 4:47 pm ]
Post subject:  Re: Programming a Kill Switch

I'd use multitasking. Have a task dedicated to reading the kill switch feedback. If the switch is ever held for 3 seconds (I'd use a loop and timer to measure continuous button press), that task can StopAllTasks().

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group