Example for sending and receiving simple broadcast commands using the RF interface on the Pi Swarm
Dependencies: Pi_Swarm_Library_v06_alpha mbed
Fork of Pi_Swarm_Blank by
main.h@5:ca18d81a3212, 2015-03-10 (annotated)
- Committer:
- jah128
- Date:
- Tue Mar 10 16:33:54 2015 +0000
- Revision:
- 5:ca18d81a3212
- Parent:
- 4:823174be9a6b
Added example
Who changed what in which revision?
User | Revision | Line number | New 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 | 5:ca18d81a3212 | 17 | #include "communications.h" |
jah128 | 1:37502eb3b70f | 18 | |
jah128 | 1:37502eb3b70f | 19 | void handleUserRFCommand(char * data, char length); |
jah128 | 1:37502eb3b70f | 20 | void handleUserRFCommand(char sender, char broadcast_message, char request_response, char id, char is_command, char function, char * data, char length); |
jah128 | 1:37502eb3b70f | 21 | void handleUserRFResponse(char sender, char broadcast_message, char request_response, char id, char is_command, char function, char * data, char length); |
jah128 | 1:37502eb3b70f | 22 | void processRawRFData(char * rstring, char cCount); |
jah128 | 5:ca18d81a3212 | 23 | void broadcast_user_rf_command(int function, char * message, int length); |
jah128 | 1:37502eb3b70f | 24 | void switch_pressed ( void ); |
jah128 | 1:37502eb3b70f | 25 | |
jah128 | 1:37502eb3b70f | 26 | #endif //MAIN_H |