Lets you control the FRDM-K64F board over the PC using the GUI software (https://github.com/navin-bhaskar/Controller) written in Python. To use the software, connect the FRDM-K64Fto your PC (via USB cable connected to USB port labelled as "open SDA") and start the software to control the FRDM-K64F. For more info on usage, please go to: http://navinbhaskar.blogspot.in/2013/02/arduino-controller-3.html
Dependencies: mbed
Console.h@0:7ce46d3f9f5d, 2014-08-08 (annotated)
- Committer:
- Navin
- Date:
- Fri Aug 08 02:27:42 2014 +0000
- Revision:
- 0:7ce46d3f9f5d
This application lets you control the FRDM-K64F Frdm board with a front end GUI software written in Python (https://github.com/navin-bhaskar/Controller)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Navin | 0:7ce46d3f9f5d | 1 | /* |
Navin | 0:7ce46d3f9f5d | 2 | * This program is free software; you can redistribute it and/or modify |
Navin | 0:7ce46d3f9f5d | 3 | * it under the terms of the GNU General Public License as published by |
Navin | 0:7ce46d3f9f5d | 4 | * the Free Software Foundation; either version 2 of the License, or |
Navin | 0:7ce46d3f9f5d | 5 | * (at your option) any later version. |
Navin | 0:7ce46d3f9f5d | 6 | * |
Navin | 0:7ce46d3f9f5d | 7 | * This program is distributed in the hope that it will be useful, |
Navin | 0:7ce46d3f9f5d | 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
Navin | 0:7ce46d3f9f5d | 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
Navin | 0:7ce46d3f9f5d | 10 | * GNU General Public License for more details. |
Navin | 0:7ce46d3f9f5d | 11 | * |
Navin | 0:7ce46d3f9f5d | 12 | * You should have received a copy of the GNU General Public License |
Navin | 0:7ce46d3f9f5d | 13 | * along with this program; if not, write to the Free Software |
Navin | 0:7ce46d3f9f5d | 14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
Navin | 0:7ce46d3f9f5d | 15 | * MA 02110-1301, USA. |
Navin | 0:7ce46d3f9f5d | 16 | * |
Navin | 0:7ce46d3f9f5d | 17 | */ |
Navin | 0:7ce46d3f9f5d | 18 | |
Navin | 0:7ce46d3f9f5d | 19 | |
Navin | 0:7ce46d3f9f5d | 20 | #ifndef __CONSOLE_H |
Navin | 0:7ce46d3f9f5d | 21 | #define __CONSOLE_H |
Navin | 0:7ce46d3f9f5d | 22 | /** |
Navin | 0:7ce46d3f9f5d | 23 | * \brief Provides the interfaces for console IO functionality |
Navin | 0:7ce46d3f9f5d | 24 | */ |
Navin | 0:7ce46d3f9f5d | 25 | #include "error.h" |
Navin | 0:7ce46d3f9f5d | 26 | class Console |
Navin | 0:7ce46d3f9f5d | 27 | { |
Navin | 0:7ce46d3f9f5d | 28 | public: |
Navin | 0:7ce46d3f9f5d | 29 | virtual char getCh() = 0; |
Navin | 0:7ce46d3f9f5d | 30 | virtual void putCh(char ch) = 0; |
Navin | 0:7ce46d3f9f5d | 31 | virtual void puts(char *str) = 0; |
Navin | 0:7ce46d3f9f5d | 32 | virtual void printf(char *fmt, ...) = 0; |
Navin | 0:7ce46d3f9f5d | 33 | virtual void printErr(uint err) |
Navin | 0:7ce46d3f9f5d | 34 | { |
Navin | 0:7ce46d3f9f5d | 35 | char errMsgs[][20] = { |
Navin | 0:7ce46d3f9f5d | 36 | "ERROR", |
Navin | 0:7ce46d3f9f5d | 37 | "SUCCESS", |
Navin | 0:7ce46d3f9f5d | 38 | "Invalid pin", |
Navin | 0:7ce46d3f9f5d | 39 | "Invalid arguments" |
Navin | 0:7ce46d3f9f5d | 40 | }; |
Navin | 0:7ce46d3f9f5d | 41 | if (err > 4) |
Navin | 0:7ce46d3f9f5d | 42 | { |
Navin | 0:7ce46d3f9f5d | 43 | err = 0; |
Navin | 0:7ce46d3f9f5d | 44 | } |
Navin | 0:7ce46d3f9f5d | 45 | puts(&errMsgs[err][0]); |
Navin | 0:7ce46d3f9f5d | 46 | puts("OK"); |
Navin | 0:7ce46d3f9f5d | 47 | } |
Navin | 0:7ce46d3f9f5d | 48 | virtual int available() = 0; |
Navin | 0:7ce46d3f9f5d | 49 | }; |
Navin | 0:7ce46d3f9f5d | 50 | |
Navin | 0:7ce46d3f9f5d | 51 | #endif |
Navin | 0:7ce46d3f9f5d | 52 |