#include "InitLCD.h"
#include "WordStorage.h";
WordStorage wordStore;
void setup() {
Serial.begin(115200);
InitLCD();
//printWordFromStore();
printWordFromData();
}
void loop() {
// put your main code here, to run repeatedly:
}
void printWordFromData() {
for (int i = 0; i < 10; i++) {
int data = analogRead(A0);
Serial.print(i);
Serial.print('\t');
if (wordStore.wordFromData(data)) {
Serial.print(data);
Serial.print('\t');
Serial.print(wordStore.word());
lcd.clear();
lcd.print(wordStore.word());
}
Serial.println();
}
}
void printWordFromStore() {
int i = 0;
while (wordStore.wordFromCat(0, i)) {
Serial.println(wordStore.word());
lcd.clear();
lcd.print(wordStore.word());
i++;
}
Serial.println(wordStore.numberOfCategories());
};