EEPROM.read()

[EEPROM]

説明

Reads a byte from the EEPROM.

Syntax

EEPROM.read(address)

Parameters

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

Returns

the value stored in that location (byte)

Example

#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


Libraries Reference Home

86Duino のリファレンスのテキストは Arduino レファレンス を編集したもので、 Creative Commons Attribution-ShareAlike 3.0 License下でライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。

コメントする

上部へスクロール