Skip to content

Commit

Permalink
update Arduino101 example
Browse files Browse the repository at this point in the history
  • Loading branch information
moxondesign committed Sep 27, 2016
1 parent ca0de4e commit 6408ef1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
12 changes: 4 additions & 8 deletions examples/ARDUINO_101/Embedis_101/EEPROM.ino
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@
// e.g. embedis-> select EEPROM
// The Embedis default database is "EEPROM", using the internal EEPROM memory.
//
#if defined(ARDUINO_ARCH_ARC32)
#include "CurieEEPROM.h"
#else
#include <EEPROM.h>
#endif
#include <EEPROM.h>

// Set your particular EEPROM size, which may want to be less than the physical device size.
// As an example, a 16K byte EEPROM might use only the first 4096 bytes to
Expand All @@ -54,12 +50,12 @@ void setup_EEPROM(const String& dict)
EEPROM.begin();
Embedis::dictionary( dict,
emEEPROM_SIZE,
[](size_t pos) -> char { return EEPROM.read8(pos); },
[](size_t pos, char value) { EEPROM.write8(pos, value); },
[](size_t pos) -> char { return EEPROM.read(pos); },
[](size_t pos, char value) { EEPROM.write(pos, value); },
[]() { delay(10); }
);
LOG( String() + F("[ Embedis : EEPROM dictionary installed ]") );
LOG( String() + F("[ Embedis : EEPROM dictionary selected ]") );
LOG( String() + F("[ Embedis : Note Bene! CurieEEPROM is NOT writing data yet - we're working on it! ]") );
LOG( String() + F("[ Embedis : Note Bene! EEPROM 'Set' takes a long time on Arduino101... (wait for it!)]") );
}

6 changes: 3 additions & 3 deletions examples/ARDUINO_101/Embedis_101/Embedis_101.ino
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ void setup()
LOG( String() + F("[ Embedis : Arduino101 (Intel Curie) Sketch ]") );
LOG( String() + F("[ Embedis : select 115200 Baud and 'Both NL & CR' as your line ending ]") );

/* create the "SRAM" dictionary (internal RAM) */
setup_SRAM();

/* create the "EEPROM" dictionary (internal EEPROM) */
setup_EEPROM();

/* create the "SRAM" dictionary (internal RAM) */
setup_SRAM();

/* Add some useful commands the embedis command line interpreter (CLI */
setup_commands();
}
Expand Down
11 changes: 8 additions & 3 deletions examples/ARDUINO_101/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@

## Examples for Arduino101

Just starting support for the Arduino101 platform.
It compiles and executes, however the CurrieEEPROM emulation in Flash,
doesn't appear to be "writing" data correctly yet - not sure where the problem lies...
Initial support for the Arduino101 platform.

Notes:
1) Tested good on 9/26/2016 with configuration:
IntelCurieBoard (Arduino101) Version 1.0.7 on Arduino Version 1.6.9
"set" (EEPROM Write) takes a LONG TIME to return - like 20-30 secs
so there is still something funky with "CurieEEPROM" we think...


## Contributors

Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Embedis
version=1.1.8
version=1.1.9
author=David Turnbull, Tom Moxon
maintainer=The PatternAgents, LLC <[email protected]>
sentence=An Embedded Dictionary Server.
Expand Down

0 comments on commit 6408ef1

Please sign in to comment.