Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Nov 24, 2023
1 parent 172f294 commit e2893b0
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- simplify **begin()**, remove setting Wire pins from library.
- add **getAddress()**
- update readme.md
- update examples


## [1.7.4] - 2023-09-06
Expand Down
2 changes: 2 additions & 0 deletions examples/I2C_eeprom_cyclic_store/I2C_eeprom_cyclic_store.ino
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ void setup()
Serial.begin(115200);
while(!Serial);

Wire.begin();

ee.begin();

cs.begin(ee, PAGE_SIZE, MEMORY_SIZE/PAGE_SIZE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ uint32_t start, diff;
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
Serial.println(__FILE__);
Serial.print("I2C_EEPROM_VERSION: ");
Serial.println(I2C_EEPROM_VERSION);

Wire.begin();

ee.begin();
if (! ee.isConnected())
{
Expand Down
3 changes: 3 additions & 0 deletions examples/I2C_eeprom_format/I2C_eeprom_format.ino
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ uint32_t start, diff;
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
Serial.println(__FILE__);
Serial.print("I2C_EEPROM_VERSION: ");
Serial.println(I2C_EEPROM_VERSION);

Wire.begin();

ee.begin();
if (! ee.isConnected())
{
Expand Down
8 changes: 4 additions & 4 deletions examples/I2C_eeprom_struct/I2C_eeprom_struct.ino
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ struct
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for Serial to connect.

while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
Serial.println(__FILE__);
Serial.print("VERSION: ");
Serial.print("I2C_EEPROM_VERSION: ");
Serial.println(I2C_EEPROM_VERSION);
Serial.println();

Wire.begin();

ee.begin();
if (! ee.isConnected())
Expand Down
6 changes: 5 additions & 1 deletion examples/I2C_eeprom_test/I2C_eeprom_test.ino
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ uint32_t start, diff, totals = 0;
void setup()
{
SERIAL_OUT.begin(115200);
while (!SERIAL_OUT); // wait for SERIAL_OUT port to connect. Needed for Leonardo only
while (!SERIAL_OUT); // wait for SERIAL_OUT port to connect. Needed for Leonardo only
SERIAL_OUT.println(__FILE__);
SERIAL_OUT.print("I2C_EEPROM_VERSION: ");
SERIAL_OUT.println(I2C_EEPROM_VERSION);

Wire.begin();

ee.begin();
if (! ee.isConnected())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ uint32_t start, diff, totals = 0;
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
Serial.println(__FILE__);
Serial.print("VERSION: ");
Serial.print("I2C_EEPROM_VERSION: ");
Serial.println(I2C_EEPROM_VERSION);

Wire.begin();

ee.begin();
if (! ee.isConnected())
{
Expand Down
7 changes: 4 additions & 3 deletions examples/I2C_eeprom_update/I2C_eeprom_update.ino
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ uint32_t start, dur1, dur2;
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for SERIAL_OUT port to connect. Needed for Leonardo only

while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
Serial.println(__FILE__);
Serial.print("VERSION: ");
Serial.print("I2C_EEPROM_VERSION: ");
Serial.println(I2C_EEPROM_VERSION);

Wire.begin();

ee.begin();
if (! ee.isConnected())
{
Expand Down
8 changes: 4 additions & 4 deletions examples/I2C_eeprom_updateBlock/I2C_eeprom_updateBlock.ino
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ uint8_t ar[100];
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for SERIAL_OUT port to connect. Needed for Leonardo only

while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
Serial.println(__FILE__);
Serial.print("VERSION: ");
Serial.print("I2C_EEPROM_VERSION: ");
Serial.println(I2C_EEPROM_VERSION);
Serial.println();

Wire.begin();

ee.begin();
if (! ee.isConnected())
Expand Down
7 changes: 4 additions & 3 deletions examples/I2C_eeprom_verify/I2C_eeprom_verify.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ uint32_t start, dur1, dur2;
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for SERIAL_OUT port to connect. Needed for Leonardo only

while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
Serial.println(__FILE__);
Serial.print("VERSION: ");
Serial.print("I2C_EEPROM_VERSION: ");
Serial.println(I2C_EEPROM_VERSION);

Wire.begin();

ee.begin();
if (! ee.isConnected())
{
Expand Down
2 changes: 2 additions & 0 deletions examples/I2C_small_eeprom_test/I2C_small_eeprom_test.ino
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ void setup()
SERIAL_DEBUG.println("IT IS BEGINNING");
SERIAL_DEBUG.println("WAIT FOR IT");

Wire.begin();

eeprom.begin();

readAndWriteVar();
Expand Down

0 comments on commit e2893b0

Please sign in to comment.