it appears eeprom.write will only save numbers up to 255
is there another way to do this on a T3.2 ?
how many times can you write to the eprom before it fails ?
is it better to save my data to an sd card instead ?
Use the EEPROM 'put' function instead of 'write'. The 'write' function only writes a single byte, while the 'put' function uses a C++ template and it writes an entire data structure (or scalar type). Use the 'get' function to read it back.
See the examples 'eeprom_put.ino' and 'eeprom_get.ino' for more information.
In theory, the EEPROM on the Teensy 3.2 can do 100M read/write cycles (https://www.nxp.com/docs/en/application-note/AN4282.pdf), but Paul can probably tell you what configuration that is used in the Teensy 3.2 is actually rated at.
In terms of using a SD card over flash, it depends on how often you write to EEPROM, whether you need to remove the data, etc.
Note, for the other users reading this, I believe the Teensy LC is the only ARM based Teensy where it is recommended not to use EEPROM, since it doesn't have a separate EEPROM area, and just uses a bit of the program flash memory.
the t4 does the sameUse the EEPROM 'put' function instead of 'write'. The 'write' function only writes a single byte, while the 'put' function uses a C++ template and it writes an entire data structure (or scalar type). Use the 'get' function to read it back.
See the examples 'eeprom_put.ino' and 'eeprom_get.ino' for more information.
In theory, the EEPROM on the Teensy 3.2 can do 100M read/write cycles (https://www.nxp.com/docs/en/application-note/AN4282.pdf), but Paul can probably tell you what configuration that is used in the Teensy 3.2 is actually rated at.
In terms of using a SD card over flash, it depends on how often you write to EEPROM, whether you need to remove the data, etc.
Note, for the other users reading this, I believe the Teensy LC is the only ARM based Teensy where it is recommended not to use EEPROM, since it doesn't have a separate EEPROM area, and just uses a bit of the program flash memory.
the t4 does the same