Blank program for Pi Swarm Robot
Dependencies: Pi_Swarm_Library mbed
Diff: main.h
- Revision:
- 1:37502eb3b70f
- Parent:
- 0:46cd1498a39a
- Child:
- 2:e806b595f9ce
--- a/main.h Mon Nov 11 00:01:15 2013 +0000 +++ b/main.h Sun Feb 02 21:18:16 2014 +0000 @@ -1,1 +1,41 @@ -void switch_pressed ( void ); \ No newline at end of file +/* University of York Robot Lab Pi Swarm Robot Library + * + * (C) Dr James Hilder, Dept. Electronics & Computer Science, University of York + * + * Version 0.4 January 2014 + * + * Designed for use with the Pi Swarm Board (enhanced MBED sensor board) v1.1 + * + * Based on the original m3pi library, Copyright (c) 2007-2010 cstyles (see copyright notice at end of file) * + */ + +#ifndef MAIN_H +#define MAIN_H + +#include "piswarm.h" + +#define SWARM_SIZE 32 +#define USE_COMMUNICATION_STACK 1 +#define CALIBRATE_COLOURS 1 +#define CENTER_LED_BRIGHTNESS 30 +#define OUTER_LED_BRIGHTNESS 50 +#define PC_BAUD 115200 +#define RF_ALLOW_COMMANDS 1 +#define RF_USE_LEDS 1 +#define RF_USE_TDMA 1 +#define RF_TDMA_TIME_PERIOD_US 15625 +#define PISWARM_DEBUG 1 +#define RF_DEBUG 1 +#define RF_VERBOSE 1 +#define START_RADIO_ON_BOOT 1 +#define RF_FREQUENCY 435000000 +#define RF_DATARATE 57600 + +void handleUserRFCommand(char * data, char length); +void handleUserRFCommand(char sender, char broadcast_message, char request_response, char id, char is_command, char function, char * data, char length); +void handleUserRFResponse(char sender, char broadcast_message, char request_response, char id, char is_command, char function, char * data, char length); +void processRawRFData(char * rstring, char cCount); + +void switch_pressed ( void ); + +#endif //MAIN_H \ No newline at end of file