Aggregation-Flocking_2

Dependencies:   Pi_Swarm_Library_v06_alpha mbed

Fork of Pi_Swarm_Blank by piswarm

Committer:
edgarbuchanan
Date:
Wed Aug 13 10:19:14 2014 +0000
Revision:
6:a13d06616ae1
Parent:
5:66e1a4c974dd
Aggregation-Flocking

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jah128 2:e806b595f9ce 1 /*******************************************************************************************
jah128 2:e806b595f9ce 2 *
jah128 2:e806b595f9ce 3 * University of York Robot Lab Pi Swarm Robot Library
jah128 1:37502eb3b70f 4 *
jah128 1:37502eb3b70f 5 * (C) Dr James Hilder, Dept. Electronics & Computer Science, University of York
jah128 1:37502eb3b70f 6 *
jah128 4:823174be9a6b 7 * Version 0.6 February 2014
jah128 1:37502eb3b70f 8 *
jah128 2:e806b595f9ce 9 * Designed for use with the Pi Swarm Board (enhanced MBED sensor board) v1.2
jah128 1:37502eb3b70f 10 *
jah128 2:e806b595f9ce 11 ******************************************************************************************/
jah128 1:37502eb3b70f 12
jah128 1:37502eb3b70f 13 #ifndef MAIN_H
jah128 1:37502eb3b70f 14 #define MAIN_H
jah128 1:37502eb3b70f 15
jah128 1:37502eb3b70f 16 #include "piswarm.h"
jah128 1:37502eb3b70f 17
jah128 1:37502eb3b70f 18 void handleUserRFCommand(char * data, char length);
jah128 1:37502eb3b70f 19 void handleUserRFCommand(char sender, char broadcast_message, char request_response, char id, char is_command, char function, char * data, char length);
jah128 1:37502eb3b70f 20 void handleUserRFResponse(char sender, char broadcast_message, char request_response, char id, char is_command, char function, char * data, char length);
jah128 1:37502eb3b70f 21 void processRawRFData(char * rstring, char cCount);
jah128 1:37502eb3b70f 22 void switch_pressed ( void );
jah128 1:37502eb3b70f 23
edgarbuchanan 5:66e1a4c974dd 24 //This function collects all outer IR sensors information and store them in an array.
edgarbuchanan 5:66e1a4c974dd 25 void get_sensors_values( void );
edgarbuchanan 6:a13d06616ae1 26 //Detect strongest source of IR and face towards it. Cosntant defines rate of spin.
edgarbuchanan 6:a13d06616ae1 27 void attraction( float direction_constant );
edgarbuchanan 6:a13d06616ae1 28 //Do flocking behaviour
edgarbuchanan 6:a13d06616ae1 29 void flocking( void );
edgarbuchanan 6:a13d06616ae1 30 //Do aggregation behaviour
edgarbuchanan 6:a13d06616ae1 31 void aggregation( void );
edgarbuchanan 5:66e1a4c974dd 32
jah128 1:37502eb3b70f 33 #endif //MAIN_H