Swarm Robot Project E-puck Code

From Mech
Revision as of 18:34, 19 January 2009 by Hwang (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Description of the files:

  • main.c: This contains the entry point of the code and contains the initialization routines, main loop, and interrupt service routines.
  • e_epuck_ports.h: Contains I/O pin definitions.
  • main.h: Contains global variables, macros, and the delay function.
  • e_init_port.h/.c: Initializes the ports on the e-puck. File is from the standard e-puck library.
  • e_led.h/.c: Handes LED manipulation functions. File is from the standard e-puck library.
  • e_motors_swarm.h/.c: Motor control and dead reckoning functions. This is a modified version of the standard e_motors.h/.c library file, with dead reckoning functions added.
  • dsPIC_XBeePackets.h: Contains functions and data structures for assembling and receiving XBee packets.
  • PI_consensus_estimator: Contains functions and data structures for the PI consensus estimator.

main.c

This contains the entry point of the code and contains the initialization routines, main loop, and interrupt service routines.

main(void)

This is the entry point of the code, and contains initialization routines and the main (infinite) loop.

void __attribute__((__interrupt__,auto_psv)) _T1Interrupt(void)

This is the interrupt service routine for Timer1. This is the "system tick" and triggers every 0.2 seconds. It sets a flag to indicate that the interrupt has been triggered.

main.h==

e_init_port.h/.c

e_led.h/.c

e_motors_swarm.h/.c

Personal tools