YRL Maze lab made more script-y
Dependencies: PsiSwarmLab-ScriptingBased mbed
Fork of UKESF_Lab by
main.h
- Committer:
- jah128
- Date:
- 2015-10-26
- Revision:
- 9:085e090e1ec1
- Parent:
- 7:ef9ab01b9e26
- Child:
- 10:1b09d4bb847b
File content as of revision 9:085e090e1ec1:
/*********************************************************************** ** ██████╗ ███████╗██╗███████╗██╗ ██╗ █████╗ ██████╗ ███╗ ███╗ ** ** ██╔══██╗██╔════╝██║██╔════╝██║ ██║██╔══██╗██╔══██╗████╗ ████║ ** ** ██████╔╝███████╗██║███████╗██║ █╗ ██║███████║██████╔╝██╔████╔██║ ** ** ██╔═══╝ ╚════██║██║╚════██║██║███╗██║██╔══██║██╔══██╗██║╚██╔╝██║ ** ** ██║ ███████║██║███████║╚███╔███╔╝██║ ██║██║ ██║██║ ╚═╝ ██║ ** ** ╚═╝ ╚══════╝╚═╝╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ** ************************************************************************ **(C) Dr James Hilder - York Robotics Laboratory - University of York ** ***********************************************************************/ /// PsiSwarm Beautiful Meme Project Source Code /// Version 0.1 /// James Hilder, Alan Millard, Homero Elizondo, Jon Timmis /// University of York #ifndef MAIN_H #define MAIN_H #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 extern int robots_heading[8]; // These are the headings from the last time the respective robots were detected extern unsigned short robots_distance[8]; // This is the maximum sensor value from the last time the respective robot was detected 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, ...) ; #endif