diff options
Diffstat (limited to 'libraries/EEPROM/examples/eeprom_get')
-rw-r--r-- | libraries/EEPROM/examples/eeprom_get/eeprom_get.ino | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libraries/EEPROM/examples/eeprom_get/eeprom_get.ino b/libraries/EEPROM/examples/eeprom_get/eeprom_get.ino index dcd8678..6620999 100644 --- a/libraries/EEPROM/examples/eeprom_get/eeprom_get.ino +++ b/libraries/EEPROM/examples/eeprom_get/eeprom_get.ino @@ -23,8 +23,11 @@ void setup(){ int eeAddress = 0; //EEPROM address to start reading from Serial.begin( 9600 ); + while (!Serial) { + ; // wait for serial port to connect. Needed for Leonardo only + } Serial.print( "Read float from EEPROM: " ); - + //Get the float data from the EEPROM at position 'eeAddress' EEPROM.get( eeAddress, f ); Serial.println( f, 3 ); //This may print 'ovf, nan' if the data inside the EEPROM is not a valid float. |