Programming Arduino Next Steps by Simon Monk

Programming Arduino Next Steps by Simon Monk

Author:Simon Monk
Language: eng
Format: epub
Publisher: McGraw-Hill Education
Published: 2019-11-03T16:00:00+00:00


The argument to eeprom_read_word (10) and the first argument to eeprom_write_word are the starting position of the word. Note that this occupies two bytes, so if you want to save another int, you specify an address of 12, not 11. The text (uint16_t*) before 10 is needed to make the index position the type expected by the library function.

The other useful pair of functions in this library are eeprom_read_block and eeprom_write_block. These functions allow data structures of any length (space permitting) to be stored and retrieved.

For example, let’s make a sketch to write a character array string, starting at position 100 in EEPROM:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.