This is a example application for StarBoard Orange designed by @logic_star. This example can be drive a CHORO Q HYBRID.
Diff: mylib/ChoroQ.h
- Revision:
- 1:03c8bc666945
- Parent:
- 0:127b9ca59547
diff -r 127b9ca59547 -r 03c8bc666945 mylib/ChoroQ.h --- a/mylib/ChoroQ.h Tue Aug 24 11:58:09 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -#ifndef _CHORO_Q_H_ -#define _CHORO_Q_H_ - -#include <mbed.h> -#include <inttypes.h> -#include <TransmitterIR.h> - -class ChoroQ { -public: - - typedef enum { - ChA, - ChB, - ChC, - ChD - } Channel; - - ChoroQ(PinName pin, Channel ch); - ~ChoroQ(); - - typedef enum { - Undef, - Up, - Down, - Left, - Right, - UpDash, - UpLeft, - UpRight, - UpRightDash, - UpLeftDash, - DownLeft, - DownRight, - DownDash, - DownLeftDash, - DownRightDash, - Stop - } Action; - - void execute(Action action); - -private: - typedef struct { - Action action; - char *command; - } action_t; - - static const int CH_A = 0x00; - static const int CH_B = 0x02; - static const int CH_C = 0x01; - static const int CH_D = 0x03; - static const action_t list[]; - - TransmitterIR irtx; - int channel; - - uint8_t *getCommand(Action action); -}; - -#endif