James O'Keeffe
/
BeaconDemo_RobotCodeNew
ft. button press reset
Fork of BeaconDemo_RobotCode by
Diff: main.h
- Revision:
- 9:085e090e1ec1
- Parent:
- 7:ef9ab01b9e26
- Child:
- 10:1b09d4bb847b
diff -r 00558287a4ef -r 085e090e1ec1 main.h --- a/main.h Thu Oct 22 15:36:16 2015 +0000 +++ b/main.h Mon Oct 26 11:16:05 2015 +0000 @@ -19,6 +19,9 @@ #include "beacon.h" +// Define the on-period for a IR pulse in microseconds (eg 50000 for 2Hz system, 20000 for a 5Hz system) +#define BEACON_PERIOD 25000 + extern char beacon_found; // This will be a 1 if beacon is detected, 0 if it isn't extern int beacon_heading; // The heading from the last time the beacon was detected extern char robots_found[8]; // These will be a 1 when the respective robot [excluding self] was detected during the previous 500ms window @@ -27,12 +30,17 @@ extern unsigned short reflected_sensor_data[8]; // The reflected IR values when this robots emitters are on extern unsigned short background_sensor_data[8];// The raw IR values when no robot (or beacon) should have its IR on +void update_display(void); +void display_debug_info(void); + void user_code_setup(void); void user_code_loop(void); void handle_switch_event(char switch_state); int main(void); +void head_to_bearing_program(int target_bearing); + void display_ir_readings(void); void out(const char* format, ...) ;