Permalink
Browse files

created arduino libraries for storage, for abstract out word storage,…

… and change arduino sketch to reflect it
  • Loading branch information...
1 parent 12c9a58 commit 731c96577539f27e87a13d53d4886dfb7cdc5e1c @sweemeng committed Apr 9, 2011
Showing with 29 additions and 0 deletions.
  1. +15 −0 libraries/storyboard/WordStorage.cpp
  2. +14 −0 libraries/storyboard/WordStorage.h
View
15 libraries/storyboard/WordStorage.cpp
@@ -0,0 +1,15 @@
+#include "WProgram.h"
+#include "WordStorage.h"
+
+WordStorage::WordStorage(){
+
+}
+
+char WordStorage::read(int pos){
+ int letter = EEPROM.read(pos);
+ return (char) letter;
+}
+
+void WordStorage::write(int pos,int data){
+ EEPROM.write(pos,data);
+}
View
14 libraries/storyboard/WordStorage.h
@@ -0,0 +1,14 @@
+#ifndef WORDSTORAGE_H
+#define WORDSTORAGE_H
+#include "WProgram.h"
+#include <EEPROM.h>
+
+class WordStorage{
+ public:
+ WordStorage();
+ char read(int);
+ void write(int,int);
+};
+
+#endif
+

0 comments on commit 731c965

Please sign in to comment.