Handheld controller (RF) for Pi Swarm system

Dependencies:   mbed

Fork of Pi_Swarm_Handheld_Controller by piswarm

Committer:
jah128
Date:
Tue Jun 10 11:05:23 2014 +0000
Revision:
0:d63a63feb104
Handheld controller for Pi Swarm (old code)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jah128 0:d63a63feb104 1 #ifndef MAIN_H
jah128 0:d63a63feb104 2 #define MAIN_H
jah128 0:d63a63feb104 3
jah128 0:d63a63feb104 4 #include "alpha433.h"
jah128 0:d63a63feb104 5
jah128 0:d63a63feb104 6 #define SWARM_SIZE 32
jah128 0:d63a63feb104 7 #define USE_COMMUNICATION_STACK 1
jah128 0:d63a63feb104 8 #define PC_BAUD 115200
jah128 0:d63a63feb104 9 #define RF_ALLOW_COMMANDS 1
jah128 0:d63a63feb104 10 #define RF_USE_LEDS 1
jah128 0:d63a63feb104 11 #define RF_USE_TDMA 1
jah128 0:d63a63feb104 12 #define RF_TDMA_TIME_PERIOD_US 15625
jah128 0:d63a63feb104 13 #define RF_DEBUG 1
jah128 0:d63a63feb104 14 #define RF_VERBOSE 1
jah128 0:d63a63feb104 15 #define START_RADIO_ON_BOOT 1
jah128 0:d63a63feb104 16 #define RF_FREQUENCY 435000000
jah128 0:d63a63feb104 17 #define RF_DATARATE 57600
jah128 0:d63a63feb104 18
jah128 0:d63a63feb104 19 extern Serial pc;
jah128 0:d63a63feb104 20 extern Alpha433 rf;
jah128 0:d63a63feb104 21 void handleUserRFResponse(char sender, char broadcast_message, char success, char id, char is_command, char function, char * data, char length);
jah128 0:d63a63feb104 22 void handleUserRFCommand(char sender, char broadcast_message, char request_response, char id, char is_command, char function, char * data, char length);
jah128 0:d63a63feb104 23
jah128 0:d63a63feb104 24 void processRawRFData(char * rstring, char cCount);
jah128 0:d63a63feb104 25 void check_switch(void);
jah128 0:d63a63feb104 26 void setup_switches(void);
jah128 0:d63a63feb104 27 void transmit_message(void);
jah128 0:d63a63feb104 28 void handleData(char * data, char length);
jah128 0:d63a63feb104 29
jah128 0:d63a63feb104 30
jah128 0:d63a63feb104 31 #endif // MAIN_H