View unanswered posts | View active topics It is currently Fri Aug 07, 2020 11:30 pm

Reply to topic  [ 2 posts ] 
Programming a Kill Switch 
Author Message

Joined: Tue Feb 23, 2016 11:40 am
Posts: 1
Post 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?

Tue Feb 23, 2016 11:44 am

Joined: Thu Jan 03, 2013 5:10 pm
Posts: 207
Location: The plateau north of the Ohio River Valley, also known as Cave Country.
Post 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().

I'm not a robot! I'm british! ~ quote from an asparagus
I am not a robot! I am a unicorn! ~ quote from a robot

Tue Mar 08, 2016 4:47 pm
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.