EEPROM.read()

[EEPROM]

描述

Reads a byte from the EEPROM.

語法

EEPROM.read(address)

參數

  • address: the location to read from, starting from 0 (int)

回傳

the value stored in that location (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);
}

參考


函式庫參考主頁面

86Duino 參考的文本是根據 Creative Commons Attribution-ShareAlike 3.0 License,部分文本是從 the Arduino reference 修改的。 參考中的代碼示例已發佈到公共領域。

發表評論

上部へスクロール