Skip to content

Commit

Permalink
added support for intptrs
Browse files Browse the repository at this point in the history
Brings support for µBrain library.
  • Loading branch information
arjo129 committed Dec 26, 2013
1 parent b996190 commit 3e05e5f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions uspeech.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 13 additions & 1 deletion vocab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,17 @@ void syllable::debugPrint(){
Serial.print(", ");
Serial.print(s);
Serial.print("]");

}
#endif
#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;
}

0 comments on commit 3e05e5f

Please sign in to comment.