working version of song control with initialization from sd card
Dependencies: MFRC522 NRF2401P SDFileSystem SPI_TFT_ILI9341 TFT_fonts mbed
Fork of Song_Control by
Diff: locker.cpp
- Revision:
- 0:c0f34d23943d
- Child:
- 1:c2232b1eaf31
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locker.cpp Sat Jan 23 00:14:37 2016 +0000 @@ -0,0 +1,43 @@ +/** +* All the code associated to run the mbed as a locker. +* Link with hub +* Link with battery +*/ +#include "mbed.h" +#include "utils.h" +#define debug + +// Flags +// Variables +// tx nRF2401 + +long long addrHub=0xBBBBBBBBBB; +int channel = 76; + +// Initializaton +/** +* Initialise for a locker +*/ +void initialiseLocker(FILE *fp){ +#ifdef debug + printf("Initialise Locker\n\r"); +#endif + + // Read in hub address and channel + if (fscanf (fp,"%x %*c %*s",&channel )!=1) writeError("Locker config: cannot read channel"); + if (fscanf (fp,"%llx %*c %*s",&addrHub )!=1) writeError("Locker config: cannot read hub address"); + +#ifdef debug + printf(" Channel:%x, Hub Address %llx \n\r",channel, addrHub); +#endif + + +} +// Interupt routines + + +// Loop through slow routines + +void loopLocker(){ + +} \ No newline at end of file