#define FACEOFF_DEBUG /**************************************************************************** Module FaceOffSM.c
|
|
- Sheena Holmes
- 5 years ago
- Views:
Transcription
1 #define FACEOFF_DEBUG /**************************************************************************** Module FaceOffSM.c Revision Description This is a template file for implementing state machines. Notes History When Who What/Why /27/17 09:48 jec another correction to re-assign both CurrentEvent and ReturnEvent to the result of the During function this eliminates the need for the prior fix and allows the during function to-remap an event that will be processed at a higher level. 02/20/17 10:14 jec correction to Run function to correctly assign ReturnEvent in the situation where a lower level machine consumed an event. 02/03/16 12:38 jec updated comments to reflect changes made in '14 & '15 converted unsigned char to bool where appropriate spelling changes on true (was True) to match standard removed local var used for debugger visibility in 'C32 commented out references to Start & RunLowerLevelSM so that this can compile. 02/07/13 21:00 jec corrections to return variable (should have been ReturnEvent, not CurrentEvent) and several EV_xxx event names that were left over from the old version 02/08/12 09:56 jec revisions for the Events and Services Framework Gen2 02/13/10 14:29 jec revised Start and run to add new kind of entry function to make implementing history entry cleaner 02/13/10 12:29 jec added NewEvent local variable to During function and comments about using either it or Event as the return 02/11/10 15:54 jec more revised comments, removing last comment in during function that belongs in the run function 02/09/10 17:21 jec updated comments about internal transitions on During funtion 02/18/09 10:14 jec removed redundant call to RunLowerlevelSM in EV_Entry processing in During function 02/20/07 21:37 jec converted to use enumerated type for events & states 02/13/05 19:38 jec added support for self-transitions, reworked to eliminate repeated transition code 02/11/05 16:54 jec converted to implment hierarchy explicitly 02/25/03 10:32 jec converted to take a passed event parameter 02/18/99 10:19 jec built template from MasterMachine.c 02/14/99 10:34 jec Began Coding ****************************************************************************/ /* Include Files */ // Basic includes for a program using the Events and Services Framework #include "ES_Configure.h" #include "ES_Framework.h" /* include header files for this state machine as well as any machines at the next lower level in the hierarchy that are sub-machines to this machine */ #include "FaceOffSM.h" #include "Beacon.h" #include "ReloadSensor.h"
2 #include "DCMotor.h" #include "ServoMotor.h" /* Module Defines */ // define constants for the states for this machine // and any other local defines #define ENTRY_STATE Drive4Offset #define RED 1 #define BLUE 0 //Assume 1000 ticks per sec #define ONE_SEC 1000 #define ROTATE_TIME 0.5*ONE_SEC //rotation time per time #define D4O_TIME 2*ONE_SEC #define D2R_TIME 3*ONE_SEC //drive to reload station time //motor defines #define Forward 0 #define Backward 1 #define CWTurn 2 #define CCWTurn 3 #define LeftMotor 0 #define RightMotor 1 //IRbeacon periods defines #define TicksPerMS //use system clock #define USperMS 1000 #define P_REDRELOAD 600 //red reload station period is 600 us #define P_BLUERELOAD 500 //blue reload station period is 500 us #define P_REDGOAL 800 //red attack goal period is 800 us #define P_BLUEGOAL 700 //blue attack goal period is 700 us #define P_THRES 25 //set period threshold to 25 us, need to tune //position defines #define P1X 930 //intermdeida point on way to reload station #define P1Y 930 #define P1T 45 #define P1bX 1860 //intermdeida point on way to reload station #define P1bY 930 #define P1bT 0 #define P2X 2250 //point right in front of reload station #define P2Y 930 #define P2T 0 #define P2bX 2400 #define P2bY 930 #define P2bT 0 //#define P3X 1235 //dummy firing postion //#define P3Y 930 //#define P3T 0 /* Module Functions */ /* prototypes for private functions for this machine, things like during functions, entry & exit functions.they should be functions relevant to the behavior of this state machine */ static ES_Event_t DuringDrive4Offset(ES_Event_t Event); static ES_Event_t DuringTurn2Reload( ES_Event_t Event); static ES_Event_t DuringDrive4Offset2(ES_Event_t Event);
3 static ES_Event_t DuringLook4Reload(ES_Event_t Event); static ES_Event_t DuringDrive2Reload( ES_Event_t Event); static ES_Event_t DuringLook4Emitter(ES_Event_t Event); static ES_Event_t DuringDrive2Emitter(ES_Event_t Event); static ES_Event_t DuringReload( ES_Event_t Event); /* Module Variables */ // everybody needs a state variable, you may need others as well static FaceOffState_t CurrentState; static uint16_t TEAM = 1; //set default team color to red static uint32_t P_RELOAD= 0; //reload station period in ticks static bool ReachedXGoal = false; static bool ReachedYGoal = false; //static bool moveback = false; //check to see if we moved back after we hit the wall //static uint32_t P_IR_Ticks = 0; /* Module Code */ /**************************************************************************** Function RunFaceOffSM Parameters ES_Event: the event to process Returns ES_Event: an event to return Description add your description here Notes uses nested switch/case to implement the machine. Author J. Edward Carryer, 2/11/05, 10:45AM ****************************************************************************/ ES_Event_t RunFaceOffSM( ES_Event_t CurrentEvent ) //set MakeTransition to false by default bool MakeTransition = false; //set NextState to CurrentState FaceOffState_t NextState = CurrentState; ES_Event_t EntryEventKind = ES_ENTRY, 0 ;// default to normal entry to new state ES_Event_t ReturnEvent = CurrentEvent; // assume we are not consuming event switch ( CurrentState ) case Drive4Offset : // If current state is Drive4Offset // Execute During function for Drive4Offset. ES_ENTRY & ES_EXIT are // processed here allow the lower level state machines to re-map // or consume the event ReturnEvent = CurrentEvent = DuringDrive4Offset(CurrentEvent); //process any events if ( CurrentEvent.EventType!= ES_NO_EVENT ) //If an event is active switch (CurrentEvent.EventType) case EV_X_TARGET_REACHED: //if event is EV_X_TARGET_REACHED ReachedXGoal = true; //set ReachedXGoal to true //if we have reached YGoal if (ReachedYGoal == true) printf("we have reached P1 \n\r");
4 Turn2Reload //stop robot StopRobot(); NextState = Turn2Reload;//Decide the next state to be MakeTransition = true; //mark that we are taking a transition Turn2Reload case EV_Y_TARGET_REACHED: //if event is EV_Y_TARGET_REACHED ReachedYGoal = true; //set ReachedYGoal to true //if we have reached XGoal if (ReachedXGoal == true) printf("we have reached P1 \n\r"); //stop robot StopRobot(); NextState = Turn2Reload;//Decide the next state to be MakeTransition = true; //mark that we are taking a transition default: ; // repeat cases as required for relevant events // repeat state pattern as required for other states case Turn2Reload : // If current state is Turn2Reload // Execute During function for Turn2Reload. ES_ENTRY & ES_EXIT are // processed here allow the lower level state machines to re-map // or consume the event ReturnEvent = CurrentEvent = DuringTurn2Reload(CurrentEvent); //process any events if ( CurrentEvent.EventType!= ES_NO_EVENT ) //If an event is active switch (CurrentEvent.EventType) case EV_ANGLE_TARGET_REACHED: //if event is EV_ANGLE_TARGET_REACHED printf("we have turned 45 deg \n\r"); NextState = Drive4Offset2;//Decide next state to be Drive4Offset2
5 MakeTransition = true; //mark that we are taking a transition default: ; // repeat state pattern as required for other states case Drive4Offset2 : // If current state is Drive4Offset2 // Execute During function for state Drive4Offset2. ES_ENTRY & ES_EXIT are // processed here allow the lower level state machines to re-map // or consume the event ReturnEvent = CurrentEvent = DuringDrive4Offset2(CurrentEvent); //process any events if ( CurrentEvent.EventType!= ES_NO_EVENT ) //If an event is active switch (CurrentEvent.EventType) case EV_X_TARGET_REACHED: //if event is EV_X_TARGET_REACHED ReachedXGoal = true; //set ReachedXGoal to be true printf("we have reached P1b (1860, 930) \n\r"); NextState = Look4Reload;//Decide next state to be Look4Reload MakeTransition = true; //mark that we are taking a transition case ES_TIMEOUT: ES_Timer_InitTimer(MOTOR_TIMER, 200); NextState = Drive4Offset2;//Decide what the next state will be MakeTransition = false; //mark that we are taking a transition default: ; case Look4Reload : // If current state is Look4Reload // Execute During function for state Look4Reload. ES_ENTRY & ES_EXIT are // processed here allow the lower level state machines to re-map // or consume the event ReturnEvent = CurrentEvent = DuringLook4Reload(CurrentEvent); //process any events
6 if ( CurrentEvent.EventType!= ES_NO_EVENT ) //If an event is active switch (CurrentEvent.EventType) case EV_BEACON_FOUND : //If event is EV_BEACON_FOUND // Execute action function for Look4Reload, EV_BEACON_FOUND //if CurrentEvent EventParam is close to the reload period we are looking for if((currentevent.eventparam <= (P_RELOAD+P_THRES))&&(CurrentEvent.EventParam >= (P_RELOAD-P_THRES))) printf("we found the beacon\n\r"); //stop beacon capture interrupt and beacon oneshot interrupt StopBeaconCapture(); StopBeaconOneShot(); NextState = Drive2Reload;//Decide next state to be Drive2Reload MakeTransition = true; //mark that we are taking a transition else //set NextState to Look4Reload, keep looking for beacon NextState = Look4Reload; //set MakeTransition to false MakeTransition = false; // repeat cases as required for relevant events case EV_BEACON_NOTFOUND: //if event is EV_BEACON_NOTFOUND //perform dummy searching, rotate a small angle per time printf("we didn't find the beacon\n\r"); //set robot to turn CW at some speed SetRobotDir(CWTurn); SetRobotSpeed(LeftMotor, 8); SetRobotSpeed(RightMotor, 10); //start a timer for rotating ES_Timer_InitTimer(MOTOR_TIMER, ROTATE_TIME); NextState = Look4Reload; //set NextState to Look4Reload MakeTransition = false; //set MakeTransition to false // repeat cases as required for relevant events case ES_TIMEOUT: //if event is ES_TIMEOUT StartBeaconOneShot(); //restart oneshot after turning a fixed angle to determine if we find the beacon NextState = Look4Reload; //set NextState to Look4Reload MakeTransition = false; //set MakeTransition to false
7 default: ; // repeat state pattern as required for other states case Drive2Reload : // If current state is Drive2Reload // Execute During function for state Drive2Reload. ES_ENTRY & ES_EXIT are // processed here allow the lower level state machines to re-map // or consume the event ReturnEvent = CurrentEvent = DuringDrive2Reload(CurrentEvent); //process any events if ( CurrentEvent.EventType!= ES_NO_EVENT ) //If an event is active switch (CurrentEvent.EventType) case EV_X_TARGET_REACHED: //if event is EV_X_TARGET_REACHED printf("we have reached relaod station \n\r"); NextState = Look4Emitter;//Decide the next state to be Look4Emitter MakeTransition = true; //mark that we are taking a transition default: ; // repeat state pattern as required for other states case Look4Emitter : // If current state is Look4Emitter // Execute During function for state Look4Emitter. ES_ENTRY & ES_EXIT are // processed here allow the lower level state machines to re-map // or consume the event ReturnEvent = CurrentEvent = DuringLook4Emitter(CurrentEvent); //process any events if ( CurrentEvent.EventType!= ES_NO_EVENT ) //If an event is active switch (CurrentEvent.EventType) case EV_EMITTER_DETECTED : //If event is EV_EMITTER_DETECTED // Execute action function for Look4Emitter, EV_EMITTER_DETECTED printf("we find the IR emitter \n\r"); printf("the period of emitter is %d\n\r", CurrentEvent.EventParam); //stop reload capture and one shot StopReloadCapture(); StopReloadOneShot(); Drive2Emitter NextState = Drive2Emitter;//Decide what next state to be MakeTransition = true; //mark that we are taking a transition
8 // repeat cases as required for relevant events case EV_EMITTER_MISSED: //if event is EV_EMITTER_MISSED //perform dummy searching, rotate a small angle per time printf("we didn't find the emitter\n\r"); //set robot to turn CW at some speed SetRobotDir(CWTurn); SetRobotSpeed(LeftMotor, 10); SetRobotSpeed(RightMotor, 10); //start a timer for turning ES_Timer_InitTimer(MOTOR_TIMER, ROTATE_TIME); ======= SetRobotDir(CWTurn); SetRobotSpeed(LeftMotor, 8); SetRobotSpeed(RightMotor, 10); ES_Timer_InitTimer(MOTOR_TIMER, ROTATE_TIME); //Set NextState to be Look4Emitter NextState = Look4Emitter; MakeTransition = false; //mark that we are not making a transition // repeat cases as required for relevant events case ES_TIMEOUT: //if event is ES_TIMEOUT StartReloadOneShot(); //restart oneshot after turning a fixed angle to determine if we find the beacon NextState = Look4Emitter; //set NextState to Look4Emitter MakeTransition = false; //mark that we are not making a transition default:; default: ; // repeat state pattern as required for other states case Drive2Emitter: //if current state is Drive2Emitter // Execute During function for state one. ES_ENTRY & ES_EXIT are // processed here allow the lower level state machines to re-map // or consume the event ReturnEvent = CurrentEvent = DuringDrive2Emitter(CurrentEvent); //process any events if ( CurrentEvent.EventType!= ES_NO_EVENT ) //If an event is active switch (CurrentEvent.EventType)
9 case EV_X_TARGET_REACHED: //if event is EV_X_TARGET_REACHED printf("we have reached P2b (2350, 930) \n\r"); StopRobot(); //stop robot NextState = Reload;//Decide the next state to be Reload MakeTransition = true; //mark that we are taking a transition default:; case Reload : // If current state is Reload // Execute During function for state one. ES_ENTRY & ES_EXIT are // processed here allow the lowe //level state machines to re-map // or consume the event ReturnEvent = CurrentEvent = DuringReload(CurrentEvent); //process any events if ( CurrentEvent.EventType!= ES_NO_EVENT ) //If an event is active switch (CurrentEvent.EventType) case ES_ENTRY : //If event is event one // Execute action function for Reload,ES_ENTRY printf("we are reloading\n\r"); NextState = Reload;//Decide next state to be Reload MakeTransition = false; //mark that we are not taking a transition // repeat cases as required for relevant events default: ; // If we are making a state transition if (MakeTransition == true) // Execute exit function for current state CurrentEvent.EventType = ES_EXIT; RunFaceOffSM(CurrentEvent); CurrentState = NextState; //Modify state variable // Execute entry function for new state // this defaults to ES_ENTRY RunFaceOffSM(EntryEventKind);
10 /**************************************************************************** Function StartFaceOffSM Parameters None Returns None Description Does any required initialization for this state machine Notes Author J. Edward Carryer, 2/18/99, 10:38AM ****************************************************************************/ void StartFaceOffSM ( ES_Event_t CurrentEvent ) // to implement entry to a history state or directly to a substate // you can modify the initialization of the CurrentState variable // otherwise just start in the entry state every time the state machine // is started //set CurrentState to be ENTRY_STATE CurrentState = ENTRY_STATE; //grab team info from passed-in event TEAM = CurrentEvent.EventParam; //grab TEAM color info printf("in face off, we are TEAM %d\n\r", TEAM); //set reload station period info according to TEAM if(team == RED) P_RELOAD = P_REDRELOAD; else P_RELOAD = P_BLUERELOAD; // call the entry function (if any) for the ENTRY_STATE RunFaceOffSM(CurrentEvent); /**************************************************************************** Function QueryFaceOffSM Parameters None Returns TemplateState_t The current state of the Template state machine Description returns the current state of the Template state machine Notes Author J. Edward Carryer, 2/11/05, 10:38AM ****************************************************************************/ FaceOffState_t QueryFaceOffSM ( void ) return(currentstate); /***************************************************************************
11 private functions ***************************************************************************/ static ES_Event_t DuringDrive4Offset( ES_Event_t Event) ES_Event_t ReturnEvent = Event; // assume no re-mapping or consumption // process ES_ENTRY, ES_ENTRY_HISTORY & ES_EXIT events if ( (Event.EventType == ES_ENTRY) (Event.EventType == ES_ENTRY_HISTORY) ) //implement any entry actions required for this state machine //upon entering this state, we start to drive the robot forward at some speed SetRobotDir(Forward); SetRobotSpeed(LeftMotor, 13); SetRobotSpeed(RightMotor, 15); //set target position (P1X, P1Y) SetTargetPosition(P1X, P1Y); //reset ReachedXGoal and ReachedYGoal to false ReachedXGoal = false; ReachedYGoal = false; // after that start any lower level machines that run in this state //StartLowerLevelSM( Event ); // repeat the StartxxxSM() functions for concurrent state machines // on the lower level else if ( Event.EventType == ES_EXIT ) // on exit, give the lower levels a chance to clean up first //RunLowerLevelSM(Event); // repeat for any concurrently running state machines // now do any local exit functionality else // do the 'during' function for this state // run any lower level state machine // ReturnEvent = RunLowerLevelSM(Event); // repeat for any concurrent lower level machines // do any activity that is repeated as long as we are in this state // return either Event, if you don't want to allow the lower level machine // to remap the current event, or ReturnEvent if you do want to allow it. static ES_Event_t DuringTurn2Reload( ES_Event_t Event) ES_Event_t ReturnEvent = Event; // assume no re-mapping or consumption // process ES_ENTRY, ES_ENTRY_HISTORY & ES_EXIT events if ( (Event.EventType == ES_ENTRY) (Event.EventType == ES_ENTRY_HISTORY) ) // implement any entry actions required for this state machine //entry Look4Reload state by starting capture and oneshot //set robot to turn CW at some speed SetRobotDir(CWTurn); SetRobotSpeed(LeftMotor, 8); SetRobotSpeed(RightMotor, 10); //Set target heading SetTargetHeading(P2T);
12 // after that start any lower level machines that run in this state //StartLowerLevelSM( Event ); // repeat the StartxxxSM() functions for concurrent state machines // on the lower level else if ( Event.EventType == ES_EXIT ) // on exit, give the lower levels a chance to clean up first //RunLowerLevelSM(Event); // repeat for any concurrently running state machines // now do any local exit functionality else // do the 'during' function for this state // run any lower level state machine // ReturnEvent = RunLowerLevelSM(Event); // repeat for any concurrent lower level machines // do any activity that is repeated as long as we are in this state // return either Event, if you don't want to allow the lower level machine // to remap the current event, or ReturnEvent if you do want to allow it. static ES_Event_t DuringDrive4Offset2( ES_Event_t Event) ES_Event_t ReturnEvent = Event; // assume no re-mapping or consumption // process ES_ENTRY, ES_ENTRY_HISTORY & ES_EXIT events if ( (Event.EventType == ES_ENTRY) (Event.EventType == ES_ENTRY_HISTORY) ) // implement any entry actions required for this state machine //upon entering this state, we start to drive the robot forward at some speed SetRobotDir(Forward); SetRobotSpeed(LeftMotor, 8); SetRobotSpeed(RightMotor, 10); //set target position (P1bX, P1bY) SetTargetPosition(P1bX, P1bY); //reset ReachedXGoal and ReachedYGoal to be false ReachedXGoal = false; ReachedYGoal = false; ES_Timer_InitTimer(MOTOR_TIMER, 200); // after that start any lower level machines that run in this state //StartLowerLevelSM( Event ); // repeat the StartxxxSM() functions for concurrent state machines // on the lower level else if ( Event.EventType == ES_EXIT ) // on exit, give the lower levels a chance to clean up first //RunLowerLevelSM(Event); // repeat for any concurrently running state machines // now do any local exit functionality else // do the 'during' function for this state
13 // run any lower level state machine // ReturnEvent = RunLowerLevelSM(Event); // repeat for any concurrent lower level machines // do any activity that is repeated as long as we are in this state // return either Event, if you don't want to allow the lower level machine // to remap the current event, or ReturnEvent if you do want to allow it. static ES_Event_t DuringLook4Reload(ES_Event_t Event) ES_Event_t ReturnEvent = Event; // assume no re-mapping or consumption // process ES_ENTRY, ES_ENTRY_HISTORY & ES_EXIT events if ( (Event.EventType == ES_ENTRY) (Event.EventType == ES_ENTRY_HISTORY) ) // implement any entry actions required for this state machine //entry Look4Reload state by starting capture and oneshot printf("we are in Look4 reload station state\n\r"); //init and start beacon capture and beacon oneshot InitBeaconEdgeCapturePeriod(); InitBeaconOneShot(); StartBeaconCapture(); StartBeaconOneShot(); // after that start any lower level machines that run in this state //StartLowerLevelSM( Event ); // repeat the StartxxxSM() functions for concurrent state machines // on the lower level else if ( Event.EventType == ES_EXIT ) // on exit, give the lower levels a chance to clean up first //RunLowerLevelSM(Event); // repeat for any concurrently running state machines // now do any local exit functionality else // do the 'during' function for this state // run any lower level state machine // ReturnEvent = RunLowerLevelSM(Event); // repeat for any concurrent lower level machines // do any activity that is repeated as long as we are in this state // return either Event, if you don't want to allow the lower level machine // to remap the current event, or ReturnEvent if you do want to allow it. static ES_Event_t DuringDrive2Reload( ES_Event_t Event) ES_Event_t ReturnEvent = Event; // assume no re-mapping or consumption // process ES_ENTRY, ES_ENTRY_HISTORY & ES_EXIT events if ( (Event.EventType == ES_ENTRY) (Event.EventType == ES_ENTRY_HISTORY) )
14 // implement any entry actions required for this state machine //upon leaving this state, we start a timer and start to drive the robot printf("we are driving to reload station\n\r"); //set robot to run forward at some speed SetRobotDir(Forward); <<<<<<< HEAD SetRobotSpeed(LeftMotor, 14); SetRobotSpeed(RightMotor, 14); //set target position (P2X, P2Y) ======= SetRobotSpeed(LeftMotor, 13); SetRobotSpeed(RightMotor, 15); SetTargetPosition(P2X, P2Y); //ReachedXGoal = false; // ReachedYGoal = false; // ES_Timer_InitTimer(MOTOR_TIMER, 500); // ES_Timer_InitTimer(MOTOR_TIMER, D2R_TIME); // after that start any lower level machines that run in this state //StartLowerLevelSM( Event ); // repeat the StartxxxSM() functions for concurrent state machines // on the lower level else if ( Event.EventType == ES_EXIT ) // on exit, give the lower levels a chance to clean up first //RunLowerLevelSM(Event); // repeat for any concurrently running state machines // now do any local exit functionality else // do the 'during' function for this state // run any lower level state machine // ReturnEvent = RunLowerLevelSM(Event); // repeat for any concurrent lower level machines // do any activity that is repeated as long as we are in this state // return either Event, if you don't want to allow the lower level machine // to remap the current event, or ReturnEvent if you do want to allow it. static ES_Event_t DuringLook4Emitter(ES_Event_t Event) ES_Event_t ReturnEvent = Event; // assume no re-mapping or consumption // process ES_ENTRY, ES_ENTRY_HISTORY & ES_EXIT events if ( (Event.EventType == ES_ENTRY) (Event.EventType == ES_ENTRY_HISTORY) ) // implement any entry actions required for this state machine //entry Look4Reload state by starting capture and oneshot printf("we are in Look4Emitter state\n\r"); //init and start reload capture and reload oneshot InitReloadCapture(); InitReloadOneShot(); StartReloadCapture();
15 StartReloadOneShot(); // after that start any lower level machines that run in this state //StartLowerLevelSM( Event ); // repeat the StartxxxSM() functions for concurrent state machines // on the lower level else if ( Event.EventType == ES_EXIT ) // on exit, give the lower levels a chance to clean up first //RunLowerLevelSM(Event); // repeat for any concurrently running state machines // now do any local exit functionality //moveback = false; else // do the 'during' function for this state // run any lower level state machine // ReturnEvent = RunLowerLevelSM(Event); // repeat for any concurrent lower level machines // do any activity that is repeated as long as we are in this state // return either Event, if you don't want to allow the lower level machine // to remap the current event, or ReturnEvent if you do want to allow it. static ES_Event_t DuringDrive2Emitter( ES_Event_t Event) ES_Event_t ReturnEvent = Event; // assume no re-mapping or consumption // process ES_ENTRY, ES_ENTRY_HISTORY & ES_EXIT events if ( (Event.EventType == ES_ENTRY) (Event.EventType == ES_ENTRY_HISTORY) ) // implement any entry actions required for this state machine //upon entering this state, we start to drive the robot forward at some speed SetRobotDir(Forward); SetRobotSpeed(LeftMotor, 13); SetRobotSpeed(RightMotor, 15); //set target position (P2bX, P2bY) SetTargetPosition(P2bX, P2bY); // after that start any lower level machines that run in this state //StartLowerLevelSM( Event ); // repeat the StartxxxSM() functions for concurrent state machines // on the lower level else if ( Event.EventType == ES_EXIT ) // on exit, give the lower levels a chance to clean up first //RunLowerLevelSM(Event); // repeat for any concurrently running state machines // now do any local exit functionality else // do the 'during' function for this state // run any lower level state machine // ReturnEvent = RunLowerLevelSM(Event); // repeat for any concurrent lower level machines
16 // do any activity that is repeated as long as we are in this state // return either Event, if you don't want to allow the lower level machine // to remap the current event, or ReturnEvent if you do want to allow it. static ES_Event_t DuringReload( ES_Event_t Event) ES_Event_t ReturnEvent = Event; // assume no re-mapping or consumption // process ES_ENTRY, ES_ENTRY_HISTORY & ES_EXIT events if ( (Event.EventType == ES_ENTRY) (Event.EventType == ES_ENTRY_HISTORY) ) // implement any entry actions required for this state machine //init IR PWM InitIRPWM(); //set servo motors to LoadBall LoadBall(); // after that start any lower level machines that run in this state //StartLowerLevelSM( Event ); // repeat the StartxxxSM() functions for concurrent state machines // on the lower level else if ( Event.EventType == ES_EXIT ) // on exit, give the lower levels a chance to clean up first //RunLowerLevelSM(Event); // repeat for any concurrently running state machines // now do any local exit functionality else // do the 'during' function for this state // run any lower level state machine // ReturnEvent = RunLowerLevelSM(Event); // repeat for any concurrent lower level machines // do any activity that is repeated as long as we are in this state // return either Event, if you don't want to allow the lower level machine // to remap the current event, or ReturnEvent if you do want to allow it.
Program Modeling Concepts:
Program Modeling Concepts: Lesson-6: FSM STATE TABLE AND ITS APPLICATIONS 1 FSM State Table A state table can then be designed for representation of every state in its rows. The following six columns are
More informationExtending CircuitPython: An Introduction
Extending CircuitPython: An Introduction Created by Dave Astels Last updated on 2018-11-15 11:08:03 PM UTC Guide Contents Guide Contents Overview How-To A Simple Example shared-module shared-bindings ports/atmel-samd
More informationData Structures. Home
SYSTIMER Home Data Structures Data Structure Index Data Fields Data Structures Here are the data structures with brief descriptions: SYSTIMER This structure contains pointer which is used to hold CPU instance
More informationNubotics Device Interface DLL
Nubotics Device Interface DLL ver-1.1 Generated by Doxygen 1.5.5 Mon Mar 2 17:01:02 2009 Contents Chapter 1 Module Index 1.1 Modules Here is a list of all modules: Initialization Functions.............................??
More informationRCX Tutorial. Commands Sensor Watchers Stack Controllers My Commands
RCX Tutorial Commands Sensor Watchers Stack Controllers My Commands The following is a list of commands available to you for programming the robot (See advanced below) On Turns motors (connected to ports
More informationGeneralised User Interface for Embedded Applications using an LCD screen and keypad.
Generalised User Interface for Embedded Applications using an LCD screen and keypad. This article is concerned with firmware design and implementation for microcontroller-based devices incorporating a
More informationIf you note any errors, typos, etc. with this manual or our software libraries, let us know at
Oregon State University Robotics Club ORK 2011 Programming Guide Version 1.0 Updated: 10/28/2011 Note: Check back for more revisions and updates soon! If you note any errors, typos, etc. with this manual
More informationActivity Inputs and Outputs VEX
Activity 3.1.1 Inputs and Outputs VEX Introduction Robots are similar to humans if you consider that both use inputs and outputs to sense and react to the world. Most humans use five senses to perceive
More informationRobotC for VEX. By Willem Scholten Learning Access Institute
RobotC for VEX By Willem Scholten Learning Access Institute 1 RobotCgetStarted.key - February 5, 2016 RobotC for VEX Section 1 - RobotC How to switch between VEX 2.0 Cortex and VEX IQ Section 2 - RobotC
More informationW I T H EAGLE ROBOTICS TEAM 7373
P R O G R A M M I N G W I T H A N D R O I D EAGLE ROBOTICS TEAM 7373 DISCLAIMER This is only an overview We cannot cover every aspect of Android Studio If you have questions, contact us using the information
More informationTeam Java Whiz: Software Code
Team Java Whiz: Software Code Table of Contents ALL SUBSYSTEM CODE 2 BUMPER 5 CONVEYOR 8 IR DETECTION 9 LOOP 11 MOTOR 18 SETUP 20 TAPE SENSOR 21 TIMERS 22 1 All Subsystem Code /**************************************************************
More informationFERGUSON BEAUREGARD. RTU-5000 Configurator User Manual
FERGUSON BEAUREGARD RTU-5000 Configurator User Manual FERGUSON BEAUREGARD RTU-5000 Configurator User Manual The Ferguson Beauregard RTU-5000 Configurator program and manuals are Copyright 1997-2004 by
More informationCookery-Book, V1.0, February XMC1400 BootKit HelloWorld
Cookery-Book, V1.0, February 2017 XMC1400 BootKit HelloWorld Programming ( Hello World ) an Infineon XMC1400 (ARM Cortex M0) Microcontroller. Using Dave/Eclipse( Code Generator, IDE, Compiler, Linker,
More informationInterrupts, timers and counters
Interrupts, timers and counters Posted on May 10, 2008, by Ibrahim KAMAL, in Micro-controllers, tagged Most microcontrollers come with a set of ADD-ONs called peripherals, to enhance the functioning of
More informationARDUINO UNO R3 BASED 20A ROBOT CONTROL BOARD [RKI-1580] Page 1
ARDUINO UNO R3 BASED 20A ROBOT CONTROL BOARD [RKI-1580] http://www.robokitsworld.com Page 1 1. Introduction: The Arduino UNO R3 based 20A robot control board is a versatile motor controller for driving
More informationArduino Uno. Power & Interface. Arduino Part 1. Introductory Medical Device Prototyping. Digital I/O Pins. Reset Button. USB Interface.
Introductory Medical Device Prototyping Arduino Part 1, http://saliterman.umn.edu/ Department of Biomedical Engineering, University of Minnesota Arduino Uno Power & Interface Reset Button USB Interface
More informationMotivation was to facilitate development of systems software, especially OS development.
A History Lesson C Basics 1 Development of language by Dennis Ritchie at Bell Labs culminated in the C language in 1972. Motivation was to facilitate development of systems software, especially OS development.
More informationArduino C++ Introduction to programming Antony Watts M0IFA
Arduino C++ Introduction to programming Antony Watts M0IFA Introduction Using the example code from a VFO sketch And along the way learn mainly about Arduino functions Libraries Open Arduino IDE, File
More informationAppendix A Pseudocode of the wlan_mac Process Model in OPNET
Appendix A Pseudocode of the wlan_mac Process Model in OPNET static void wlan_frame_transmit () { char msg_string [120]; char msg_string1 [120]; WlanT_Hld_List_Elem* hld_ptr; const WlanT_Data_Header_Fields*
More informationFujitsu Microelectronics Europe Application Note MCU-AN E-V10 FR FAMILY 32-BIT MICROCONTROLLER MB91460 REAL TIME CLOCK APPLICATION NOTE
Fujitsu Microelectronics Europe Application Note MCU-AN-300075-E-V10 FR FAMILY 32-BIT MICROCONTROLLER MB91460 REAL TIME CLOCK APPLICATION NOTE Revision History Revision History Date 2008-06-05 First Version;
More informationActivity Basic Outputs Programming Answer Key (VEX) Introduction
Activity 1.2.3 Basic Outputs Programming Answer Key (VEX) Introduction Computer programs are used in many applications in our daily life. Devices that are controlled by a processor are called outputs.
More informationColor 7 click. PID: MIKROE 3062 Weight: 19 g
Color 7 click PID: MIKROE 3062 Weight: 19 g Color 7 click is a very accurate color sensing Click board which features the TCS3472 color light to digital converter with IR filter, from ams. It contains
More information5.1. Unit 5. State Machines
5.1 Unit 5 State Machines 5.2 What is state? You see a DPS officer approaching you. Are you happy? It's late at night and your car broke down. It's late at night and you've been partying a little too hard.
More informationAdvanced RobotC. Sensors and Autonomous Coding Teams 5233 Vector and 5293 Rexbotics
Advanced RobotC Sensors and Autonomous Coding Teams 5233 Vector and 5293 Rexbotics jcagle@chapelgateacademy.org Setup Select platform NXT + TETRIX/MATRIX Create New Autonomous Configure Robot with your
More informationMotivation was to facilitate development of systems software, especially OS development.
A History Lesson C Basics 1 Development of language by Dennis Ritchie at Bell Labs culminated in the C language in 1972. Motivation was to facilitate development of systems software, especially OS development.
More informationUpgrading Software to SynqNet Phase II
Upgrading Software to SynqNet Phase II The introduction of SynqNet Phase II has necessitated changes to motor I/O and capture interfaces in the MPI library. Since the number of available motor I/O pinouts
More informationBlock Programming Guide
f Block Programming Guide FIRST Global Block Programming Guide - Rev 1 Copyright 2018 REV Robotics, LLC TABLE OF CONTENTS 1 Getting Started... 1 1.1 Prerequisites... 1 2 Introduction... 2 2.1 What is an
More informationTimers. easily added to the cooperative multitasking framework. this slide set shows 5 versions of timers, each with its own pro's & con's
Timers easily added to the cooperative multitasking framework this slide set shows 5 versions of timers, each with its own pro's & con's Timer 1 A single timer a single timer, a simple approach create
More informationMODERN OPERATING SYSTEMS. Chapter 3 Memory Management
MODERN OPERATING SYSTEMS Chapter 3 Memory Management No Memory Abstraction Figure 3-1. Three simple ways of organizing memory with an operating system and one user process. Base and Limit Registers Figure
More informationCarl Peto. 10th August 2017 SWIFT FOR ARDUINO
Carl Peto 10th August 2017 SWIFT FOR ARDUINO ARDUINO Microcontrollers are a small, cheap, multi purpose IoT computer in a box, with built in interfaces in the package, all in one chip. They can be bought
More informationGrove - 80cm Infrared Proximity Sensor User Manual
Grove - 80cm Infrared Proximity Sensor User Manual Release date: 2015/9/22 Version: 1.0 Wiki: http://www.seeedstudio.com/wiki/index.php?title=twig_-_80cm_infrared_proximity_sensor_v0.9 Bazaar: http://www.seeedstudio.com/depot/grove-80cm-infrared-
More informationActivity Inputs and Outputs VEX
Activity 3.1.1 Inputs and Outputs VEX Introduction Robots are similar to humans if you consider that both use inputs and outputs to sense and react to the world. Most humans use five senses to perceive
More informationXMC4700/XMC4800 RelaxKit HelloWorld (USB)
Cookery-Book, V1.0, A pril 2017 XMC4700/XMC4800 RelaxKit HelloWorld (USB) Programming ( Hello World ) an Infineon XMC4700 (ARM Cortex M4) Microcontroller. Using Dave/Eclipse( Code Generator, IDE, Compiler,
More informationRobotC. Remote Control
RobotC Remote Control Learning Objectives: Focusing on Virtual World with Physical Examples Understand Real-Time Joystick Mapping Understand how to use timers Understand how to incorporate buttons into
More informationProtocol of data exchange with modem via USB interface Version
Protocol of data exchange with modem via USB interface Version 2017.12.19 - Modem connects to USB-host as USB device of CDC class (virtual COM port in Windows, ttyusb or ttyacm in Linux) - Because real
More informationTokens, Expressions and Control Structures
3 Tokens, Expressions and Control Structures Tokens Keywords Identifiers Data types User-defined types Derived types Symbolic constants Declaration of variables Initialization Reference variables Type
More informationQUIZ. 1. Explain the meaning of the angle brackets in the declaration of v below:
QUIZ 1. Explain the meaning of the angle brackets in the declaration of v below: This is a template, used for generic programming! QUIZ 2. Why is the vector class called a container? 3. Explain how the
More informationRotorgeeks SSD Flight Controller Manual
Rotorgeeks SSD Flight Controller Manual Please note this is a working document, we encourage you to visit this doc as it will continually evolve. It is intended as a guide to the SSD hardware rather than
More informationActivity Basic Outputs Programming VEX
Activity 3.1.2 Basic Outputs Programming VEX Introduction Computer programs are used in many applications in our daily life. Devices that are controlled by a processor are called outputs. These devices
More informationF28069 ControlCard Lab1
F28069 ControlCard Lab1 Toggle LED LD2 (GPIO31) and LD3 (GPIO34) 1. Project Dependencies The project expects the following support files: Support files of controlsuite installed in: C:\TI\controlSUITE\device_support\f28069\v135
More informationComputer Systems II. First Two Major Computer System Evolution Steps
Computer Systems II Introduction to Processes 1 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent processes) 2 1 At First (1945 1955) In the beginning,
More information18-642: Global Variables Are Evil!
18-642: Global Variables Are Evil! 1/29/2018 2017, Philip Koopman 1 Anti-Patterns: Global Variables Are Evil! More than a few read/write globals Globals shared between tasks/threads Variables have larger
More informationDesign and Implementation
Design and Implementation The Answer to Life, the Universe and Everything Hans Verkuil Cisco Systems Norway 2013 Cisco and/or its affiliates. All rights reserved. 1 Overview Design and implementation guidelines.
More informationVariables and Functions. ROBOTC Software
Variables and Functions ROBOTC Software Variables A variable is a space in your robots memory where data can be stored, including whole numbers, decimal numbers, and words Variable names follow the same
More informationCS 170 Java Programming 1. Week 12: Creating Your Own Types
CS 170 Java Programming 1 Week 12: Creating Your Own Types What s the Plan? Topic 1: A Little Review Work with loops to process arrays Write functions to process 2D Arrays in various ways Topic 2: Creating
More informationNET3001 Fall 12. Assignment 4 (revised Oct 12,2012) Part 1 Reaction Time Tester (15 marks, assign41.c)
NET3001 Fall 12 Assignment 4 (revised Oct 12,2012) Due: Oct 25, beginning of class Submitting: Use the submit.exe program. The files should be named assign41.c assign42.c assign43.c Do either Part 1 or
More informationSoftware User's Manual
Software User's Manual Mission Science irobots Team 07 Jiashuo Li Project Manager, Life Cycle Planner, Developer Chen Li Requirements Engineer, Software Architect, Developer Farica Mascarenhas Operational
More informationINSTRUCTION MANUAL RM AM/FM Digital Alarm Clock Radio
INSTRUCTION MANUAL RM-5090 AM/FM Digital Alarm Clock Radio PRECAUTIONS CAUTION: THE APPARATUS SHALL NOT BE EXPOSED TO DRIPPING OR SPLASHING. NO OB- JECTS FILLED WITH LIQUIDS, SUCH AS VASES, SHALL BE PLACED
More informationEmbedded Systems Programming. ETEE 3285 Topic HW3: Coding, Compiling, Simulating
Embedded Systems Programming ETEE 3285 Topic HW3: Coding, Compiling, Simulating 1 Assignment Write the Chasing Lights Program in C Use Codevision AVR to compile the program and remove all syntax errors
More informationSensors and Motors Lab
Sensors and Motors Lab Nikhil Baheti Team F: ADD_IN Teammates: Nikhil Baheti, Dan Berman and Astha Prasad ILR01 October 16 th, 2015 1 Individual Progress For the sensors and motors assignment, I was responsible
More informationExperiment 4.A. Speed and Position Control. ECEN 2270 Electronics Design Laboratory 1
.A Speed and Position Control Electronics Design Laboratory 1 Procedures 4.A.0 4.A.1 4.A.2 4.A.3 4.A.4 Turn in your Pre-Lab before doing anything else Speed controller for second wheel Test Arduino Connect
More informationShalva Kohen Arunavha Chanda Kai-Zhan Lee Emma Etherington
Shalva Kohen Arunavha Chanda Kai-Zhan Lee Emma Etherington The problem: FSMs Basis of CS and CE Current standard for representation: Unintuitive interface Very long descriptions Redundant behavior commands
More informationFTC Control Systems + Java The Gifted Gears
FTC Control Systems + Java 101 Outline Control Systems REV Modern Robotics Phones and Phone Setup Programming Options and Setup Navigating Android Studios Java! OpModes Basics Actuators Teleop What Am
More informationModule Contact: Dr R J Lapeer, CMP Copyright of the University of East Anglia Version 1
UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 2012-13 GRAPHICS 1 CMPC2G04 Time allowed: 2 hours Answer THREE questions out of FOUR. (40 marks each) Notes are not permitted
More information6.01 Midterm 1 Spring 2011
Name: Section: Enter all answers in the boxes provided. During the exam you may: read any paper that you want to use a calculator You may not use a computer, phone or music player For staff use: 1. /16
More informationGNU ccscript Scripting Guide IV
GNU ccscript Scripting Guide IV David Sugar GNU Telephony 2008-08-20 (The text was slightly edited in 2017.) Contents 1 Introduction 1 2 Script file layout 2 3 Statements and syntax 4 4 Loops and conditionals
More informationInstalling and using CW 10.6 for TPMS applications. Revision 4
Installing and using CW 10.6 for TPMS applications Revision 4 Table of Contents 1. Installing Code Warrior for MCUs v10.6... 3 a. General information... 3 b. Downloading the IDE... 4 c. Installing CW 10.6...
More informationProgram your face off
Program your face off Game plan Basics of Programming Primitive types, loops, and conditionals. What is an Object oriented language? Tips and tricks of WPIlib Iterative and Command Based robots Feedback
More informationThe Go Programming Language. Frank Roberts
The Go Programming Language Frank Roberts frank.roberts@uky.edu - C++ (1983), Java (1995), Python (1991): not modern - Java is 18 years old; how has computing changed in 10? - multi/many core - web programming
More informationC++ (classes) Hwansoo Han
C++ (classes) Hwansoo Han Inheritance Relation among classes shape, rectangle, triangle, circle, shape rectangle triangle circle 2 Base Class: shape Members of a class Methods : rotate(), move(), Shape(),
More informationAnother Forking Robot
Another Forking Robot A.k.a. AFR Matt Silverman IMDL Summer 99 Table of Contents Abstract Page 3 Executive Summary 4 Introduction 5 Integrated System 5 Mobile Platform 6 Actuation 6 Sensors 6 Behaviors
More informationToday's Topics. CISC 458 Winter J.R. Cordy
Today's Topics Last Time Semantics - the meaning of program structures Stack model of expression evaluation, the Expression Stack (ES) Stack model of automatic storage, the Run Stack (RS) Today Managing
More informationJiggabot. University of Florida EEL 5666 Intelligent Machine Design Lab
Jiggabot University of Florida EEL 5666 Intelligent Machine Design Lab Student Name: Jerone Hammond Date: April 25, 2001 Instructor: Dr. A. Arroyo Table of Contents Abstract.2 Executive Summary 3 Introduction..4
More informationCMPT 115. C tutorial for students who took 111 in Java. University of Saskatchewan. Mark G. Eramian, Ian McQuillan CMPT 115 1/32
CMPT 115 C tutorial for students who took 111 in Java Mark G. Eramian Ian McQuillan University of Saskatchewan Mark G. Eramian, Ian McQuillan CMPT 115 1/32 Part I Starting out Mark G. Eramian, Ian McQuillan
More informationMECH 1500 Quiz 4 Review
Class: Date: MECH 1500 Quiz 4 Review True/False Indicate whether the statement is true or false. 1. For the timer relay contact shown, when the relay coil is energized, there is a time delay before the
More informationFunctions. Lecture 6 COP 3014 Spring February 11, 2018
Functions Lecture 6 COP 3014 Spring 2018 February 11, 2018 Functions A function is a reusable portion of a program, sometimes called a procedure or subroutine. Like a mini-program (or subprogram) in its
More informationCYTON ALPHA 7D 1G. Operations Manual
CYTON ALPHA 7D 1G Operations Manual Robai PO Box 37635 #60466 Philadelphia, PA 19101-0635 Copyright 2008 Robai. All Rights Reserved. Copyright 2008 Robai. All Rights Reserved. 2 Copyright 2008 Robai. All
More informationCGS 3460 Summer 07 Midterm Exam
Short Answer 3 Points Each 1. What would the unix command gcc somefile.c -o someotherfile.exe do? 2. Name two basic data types in C. 3. A pointer data type holds what piece of information? 4. This key
More informationUniversity of Florida Department of Electrical and Computer Engineering EEL5666 Intelligent Machines Design Laboratory. Final Report.
University of Florida Department of Electrical and Computer Engineering EEL5666 Intelligent Machines Design Laboratory Final Report Lil Helper By: Jennifer Labush Abstract...3 Executive Summary 4 Integrated
More informationState Machine Diagrams
State Machine Diagrams Introduction A state machine diagram, models the dynamic aspects of the system by showing the flow of control from state to state for a particular class. 2 Introduction Whereas an
More informationEmbedded Controller Programming II. I/O Device Programming in C Part 1: Input and Interrupts
Discovery.com Embedded Controller Programming II I/O Device Programming in C Part 1: Input and Interrupts Ken Arnold Copyright (c)2006 Ken Arnold 051221 1 Overview Basic Input Devices Switch Input Matrix
More informationRobotics Adventure Book Scouter manual STEM 1
Robotics Robotics Adventure Book Scouter Manual Robotics Adventure Book Scouter manual STEM 1 A word with our Scouters: This activity is designed around a space exploration theme. Your Scouts will learn
More informationbc620at Developer s Kit User s Guide November, 1998
bc620at Developer s Kit 8500-0086 User s Guide November, 1998 CHAPTER ONE INTRODUCTION 1.0 GENERAL The bc620at Developer s Kit is designed to provide a suite of tools useful in the development of applications
More informationName Section: M/W T/TH Number Definition Matching (8 Points)
Name Section: M/W T/TH Number Definition Matching (8 Points) 1. (8 pts) Match the words with their definitions. Choose the best definition for each word. Iteration Counter Event Counter Loop Abstract Step
More informationIII. Classes (Chap. 3)
III. Classes III-1 III. Classes (Chap. 3) As we have seen, C++ data types can be classified as: Fundamental (or simple or scalar): A data object of one of these types is a single object. int, double, char,
More informationHiKey970. I2C Development Guide. Issue 01. Date
Issue 01 Date 2018-03-11 2018. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of HiSilicon Technologies Co., Ltd.
More informationCODE TIME TECHNOLOGIES. Abassi RTOS. I2C Support
CODE TIME TECHNOLOGIES Abassi RTOS I2C Support Copyright Information This document is copyright Code Time Technologies Inc. 2015-2018 All rights reserved. No part of this document may be reproduced or
More informationChoosing a Base Class
Choosing a Base Class There a number of base classes (starting points) for your robot program. Each base class sets the style and structure of your program. Be sure to read through this section before
More informationBare Metal Application Design, Interrupts & Timers
Topics 1) How does hardware notify software of an event? Bare Metal Application Design, Interrupts & Timers 2) What architectural design is used for bare metal? 3) How can we get accurate timing? 4) How
More informationSystems Programming. Lecture 11 Timers
Systems Programming www.atomicrhubarb.com/systems Lecture 11 Timers Section Topic Where in the books Zilog PS220 (ZNEO Z16F Series Product Specification) What is a Timer (a microcontroller timer) Timers
More informationECE Homework #10
Timer 0/1/2/3 ECE 376 - Homework #10 Timer 0/1/2/3, INT Interrupts. Due Wednesday, November 14th, 2018 1) Write a program which uses INT and Timer 0/1/2/3 interrupts to play the cord C#major for 1.000
More informationTIMSK=0b ; /* enables the T/C0 overflow interrupt in the T/C interrupt mask register for */
The codes below which help in better understanding of timers and counters. I have tested this code for atmega32. I have taken reference from www.avrfreaks.net. Hope you all will find this useful. Darsh
More informationSelect2Perform Custom Assessment Builder (CAB )
Select2Perform Custom Assessment Builder (CAB ) Table of Contents THE SELECT2PERFORM CUSTOMER ASSESSMENT BUILDER... 2 Getting Started... 2 Uploading and Using Audio and Image Files in a Test Question...
More informationELEC 3040/3050 Lab Manual Lab 2 Revised 8/20/14. LAB 2: Developing and Debugging C Programs in MDK-ARM for the STM32L100RC Microcontroller
LAB 2: Developing and Debugging C Programs in MDK-ARM for the STM32L100RC Microcontroller The objective of this laboratory session is to become more familiar with the process for creating, executing and
More informationG. Tardiani RoboCup Rescue. EV3 Workshop Part 1 Introduction to RobotC
RoboCup Rescue EV3 Workshop Part 1 Introduction to RobotC Why use RobotC? RobotC is a more traditional text based programming language The more compact coding editor allows for large programs to be easily
More informationGUIDE TO SP STARTER SHIELD (V3.0)
OVERVIEW: The SP Starter shield provides a complete learning platform for beginners and newbies. The board is equipped with loads of sensors and components like relays, user button, LED, IR Remote and
More informationReliable Line Tracking
Reliable Line Tracking William Dubel January 5, 2004 Introduction: A common task for a robot is to follow a predetermined path. One popular way to mark a path is with a high contrast line, such as black
More informationSAM4 Reset Controller (RSTC)
APPLICATION NOTE AT06864: SAM4 Reset Controller (RSTC) ASF PROGRAMMERS MANUAL SAM4 Reset Controller (RSTC) This driver for SAM devices provides an interface for the configuration and management of the
More informationLecture 3 Finite State Machines
Lecture 3 Finite State Machines CMPS 146, Fall 2013 Josh McCoy Readings First three will be posted right after class. First lecture: 19-35 Decision Tree lecture: 293-309 FSM/today's lecture: 309-333 All
More informationDesigning Responsive and Real-Time Systems
Designing Responsive and Real-Time Systems Chapter 10 Renesas Electronics America Inc. Embedded Systems using the RX63N Rev. 1.0 00000-A Learning Objectives Most Embedded Systems have multiple real time
More informationDecision Making in C
Decision Making in C Decision making structures require that the programmer specify one or more conditions to be evaluated or tested by the program, along with a statement or statements to be executed
More information_ V Intel 8085 Family In-Circuit Emulation. Contents. Technical Notes
_ V9.12. 225 Technical Notes Intel 8085 Family In-Circuit Emulation This document is intended to be used together with the CPU reference manual provided by the silicon vendor. This document assumes knowledge
More informationXbee module configuration from a µcontroller
APPLICATION NOTE AN_P12AB04_1 Xbee module configuration from a µcontroller Soulier Baptiste Polytech Clermont Ferrand 2012-2013 The purpose of this application note is to explain how to configure the main
More informationMemory management, part 2: outline
Memory management, part 2: outline Page replacement algorithms Modeling PR algorithms o Working-set model and algorithms Virtual memory implementation issues 1 Page Replacement Algorithms Page fault forces
More informationChapter 7 Building robot with MicroCamp kit
MicroCamp : ATmega8 Activity Kit Manual l 63 Chapter 7 Building robot with MicroCamp kit This chapter focus learning the applications of the MICROCAMP microcontroller. The building of a robot integrates
More informationTimer 32. Last updated 8/7/18
Last updated 8/7/18 Basic Timer Function Delay Counter Load a value into a counter register The counter counts Down to zero (count down timer) Up from zero (count up timer) An action is triggered when
More informationSoftware User's Manual
Software User's Manual Mission Science irobots Team 07 Jiashuo Li Project Manager, Life Cycle Planner, Developer Chen Li Requirements Engineer, Software Architect, Developer Farica Mascarenhas Operational
More informationSPU Shaders. Mike Acton Engine Director Insomniac Games
SPU Shaders Mike Acton Engine Director Insomniac Games State of Affairs Engine Systems on SPUs SPU Optimization Understood Remaining Systems Planned Out Still Have SPU Time to Spare PPU Still Driving The
More informationA Deterministic Concurrent Language for Embedded Systems
A Deterministic Concurrent Language for Embedded Systems Stephen A. Edwards Columbia University Joint work with Olivier Tardieu SHIM:A Deterministic Concurrent Language for Embedded Systems p. 1/38 Definition
More informationStructured Analysis and Structured Design
Structured Analysis and Structured Design - Introduction to SASD - Structured Analysis - Structured Design Ver. 1.5 Lecturer: JUNBEOM YOO jbyoo@konkuk.ac.kr http://dslab.konkuk.ac.kr References Modern
More information