Papke, Kevin
- Welcome
- Period 1 - Advanced Robotics
- Period 3/4 - Design/Robotics
- Period 5 - Exploratory
- Period 6 - Technology
- Expectations
- Catapult contest - History Faire
- Pictures of my classroom
- Robotics Class Video
- Technology links
- Robot-C Programming
- Interesting Stuff
- Ocean Institute
- Fidget spinner
- 15 reasons dogs are better than cats
- Why cats are better than dogs
- Veteran's Day Webquest
- Cinco de Mayo
- PLTW Summit - Onshape Presentation
- Mechanical Power-trains
-
Kill switch and bump switch
The “Kill switch” is to stop all actions on the robot if it is getting stuck somewhere or in some way out of control. The “Kill switch” program must be defined before the “task main” and then called to run once the “task main” has started.
The bump switch is what is used to start the robot’s program and is defined once the program has started.
task estop() //this defines the function called
{ //estop (emergency stop)
while(true) //continuous loop
{if(SensorValue[limit]==1) //when the limit switch is pushed down
{
stopAllTasks(); //stop everything (this is built in function for RobotC)
}
}
}
task main() //Program begins, insert code within curly braces
{
startTask(estop);
untilBump(bump);//then you start the rest of your program under this