EEPROM:EEPROM
来自YFRobotwiki
|
EEPROM[]
描述 这个操作符允许像一个数组一样使用标识符'EEPROM'。使用这种方式可以直接对EEPROM单元进行读取和写入操作。
EEPROM[address]
address: 读/写的位置,从0开始 (int 整型)
A reference to the EEPROM cell
#include <EEPROM.h>
void setup(){
unsigned char val;
//Read first EEPROM cell.
val = EEPROM[ 0 ];
//Write first EEPROM cell.
EEPROM[ 0 ] = val;
//Compare contents
if( val == EEPROM[ 0 ] ){
//Do something...
}
}
void loop(){ /* Empty loop */ }
|
更多建议和问题欢迎反馈至 YFRobot论坛