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論壇