read()
描述
從 EEPROM 讀取一個 byte。
語法
EEPROM.read(address)
參數
address: 要讀取的位置,從 0 開始 (int 型別)
回傳
指定位置的值 (byte 型別)
範例
#include <EEPROM.h>
int a = 0;
int value;
void setup()
{
Serial.begin(9600);
}
void loop()
{
value = EEPROM.read(a);
Serial.print(a);
Serial.print("\t");
Serial.print(value);
Serial.println();
a = a + 1;
if (a == 200)
a = 0;
delay(500);
}
See also
- EEPROM.write()
The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
