Lets you control your mbed from an easy to use GUI. Entire project is on git hub: https://github.com/navin-bhaskar/Controller For usage info follow this link http://navinbhaskar.blogspot.in/2013/02/arduino-controller-3.html

Dependencies:   mbed

Committer:
Navin
Date:
Tue Feb 26 03:51:46 2013 +0000
Revision:
1:9d3340bcd863
Parent:
0:fe5850ccdb6f
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Navin 0:fe5850ccdb6f 1 /*
Navin 0:fe5850ccdb6f 2 * This program is free software; you can redistribute it and/or modify
Navin 0:fe5850ccdb6f 3 * it under the terms of the GNU General Public License as published by
Navin 0:fe5850ccdb6f 4 * the Free Software Foundation; either version 2 of the License, or
Navin 0:fe5850ccdb6f 5 * (at your option) any later version.
Navin 0:fe5850ccdb6f 6 *
Navin 0:fe5850ccdb6f 7 * This program is distributed in the hope that it will be useful,
Navin 0:fe5850ccdb6f 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Navin 0:fe5850ccdb6f 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Navin 0:fe5850ccdb6f 10 * GNU General Public License for more details.
Navin 0:fe5850ccdb6f 11 *
Navin 0:fe5850ccdb6f 12 * You should have received a copy of the GNU General Public License
Navin 0:fe5850ccdb6f 13 * along with this program; if not, write to the Free Software
Navin 0:fe5850ccdb6f 14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
Navin 0:fe5850ccdb6f 15 * MA 02110-1301, USA.
Navin 0:fe5850ccdb6f 16 *
Navin 0:fe5850ccdb6f 17 */
Navin 0:fe5850ccdb6f 18
Navin 0:fe5850ccdb6f 19
Navin 0:fe5850ccdb6f 20 #ifndef __CONSOLE_H
Navin 0:fe5850ccdb6f 21 #define __CONSOLE_H
Navin 0:fe5850ccdb6f 22 /**
Navin 0:fe5850ccdb6f 23 * \brief Provides the interfaces for console IO functionality
Navin 0:fe5850ccdb6f 24 */
Navin 0:fe5850ccdb6f 25 #include "error.h"
Navin 0:fe5850ccdb6f 26 class Console
Navin 0:fe5850ccdb6f 27 {
Navin 0:fe5850ccdb6f 28 public:
Navin 0:fe5850ccdb6f 29 virtual char getCh() = 0;
Navin 0:fe5850ccdb6f 30 virtual void putCh(char ch) = 0;
Navin 0:fe5850ccdb6f 31 virtual void puts(char *str) = 0;
Navin 0:fe5850ccdb6f 32 virtual void printf(char *fmt, ...) = 0;
Navin 0:fe5850ccdb6f 33 virtual void printErr(uint err)
Navin 0:fe5850ccdb6f 34 {
Navin 0:fe5850ccdb6f 35 char errMsgs[][20] = {
Navin 0:fe5850ccdb6f 36 "ERROR",
Navin 0:fe5850ccdb6f 37 "SUCCESS",
Navin 0:fe5850ccdb6f 38 "Invalid pin",
Navin 0:fe5850ccdb6f 39 "Invalid arguments"
Navin 0:fe5850ccdb6f 40 };
Navin 0:fe5850ccdb6f 41 if (err > 4)
Navin 0:fe5850ccdb6f 42 {
Navin 0:fe5850ccdb6f 43 err = 0;
Navin 0:fe5850ccdb6f 44 }
Navin 0:fe5850ccdb6f 45 puts(&errMsgs[err][0]);
Navin 0:fe5850ccdb6f 46 puts("OK");
Navin 0:fe5850ccdb6f 47 }
Navin 0:fe5850ccdb6f 48 virtual int available() = 0;
Navin 0:fe5850ccdb6f 49 };
Navin 0:fe5850ccdb6f 50
Navin 0:fe5850ccdb6f 51 #endif
Navin 0:fe5850ccdb6f 52