Well, my team has shown that they wanted to go with the IR sensor controller, maybe using a TV/VCR remote. But I am in charge of the programming, and I was wondering...
Would something like this (Using ROBOTC) be usable?
Code:
task Autonomous() { // Note: Just pseudocode, but whatever
while (bIfiAutonomousMode) /* Just in case... */
{
switch(GetIRInputState()) /* Get the state of the IR sensor, in a different subroutine */
{
case Button1:
Action1; // Something like "Move forward, stop"...
case Button2:
Action2; // Maybe "Turn Left"
case Button3:
Action3; // Maybe "Turn Right"
case Button4:
Action4; /* Something along the lines of: "Grab ball off overpass, however possible" */
default:
TakeNoAction; // Just "Stop Motors" or something
}
BetweenActions; // Something like "Stop Motors, Wait XX MS"
}
EndingAction; /* Play a sound or something. Reset motors for Human Control. Etc. */
}
Any comments?
__________________
Team #2970 Alum
Team #1652 Alum
2006: School Mascot for Team 1652
2007-2008: Programmer for Team 1652 (Robot Mafia)
2009: Programmer on Team 1652 (Robot Mafia), Programmer on Team 2970 (eSchool eBots)
2010-2016: Volunteer, Wisconsin Regional
2017: Programming Mentor, FRC 4247 (CougarBOTS, Obama SCTE, Milwaukee, WI)