From 3e05e5fa5a322094bb99d3da82807485ba0fa913 Mon Sep 17 00:00:00 2001 From: Arjo Chakravarty Date: Thu, 26 Dec 2013 11:40:28 +0800 Subject: [PATCH] added support for intptrs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Brings support for µBrain library. --- uspeech.h | 1 + vocab.cpp | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/uspeech.h b/uspeech.h index 8e43169..dced089 100755 --- a/uspeech.h +++ b/uspeech.h @@ -60,6 +60,7 @@ class syllable{ int f,e,o,s,h,v; syllable(); void classify(char c); + int* tointptr(); #if ARDUINO_ENVIRONMENT > 0 void debugPrint(); #endif diff --git a/vocab.cpp b/vocab.cpp index e18feb3..6930188 100755 --- a/vocab.cpp +++ b/vocab.cpp @@ -48,5 +48,17 @@ void syllable::debugPrint(){ Serial.print(", "); Serial.print(s); Serial.print("]"); + } -#endif \ No newline at end of file +#endif + +int* syllable::tointptr(){ + static int matrix[6]; + matrix[0] = f; + matrix[1] = e; + matrix[2] = o; + matrix[3] = v; + matrix[4] = h; + matrix[5] = s; + return matrix; +} \ No newline at end of file