I want to find...

検索

Shares

Table of Content

EEPROM.write()

[EEPROM]

説明

Write a byte to the EEPROM.

Syntax

EEPROM.write(address, value)

Parameters

  • address: the location to write to, starting from 0 (int)
  • value: the value to write, from 0 to 255 (byte)

Returns

none

Note

If you use the 16 KB bank of virtual EEPROM, a write will take longer time (200~250us on the average) to complete; moreover, being implemented using the on-board flash, this bank has a limited life of write/erase cycles, so you may need to be careful about how often you write to it. The 200-byte CMOS bank of virtual EEPROM is faster (take 2~3us to write) and has no the above restriction, but, if you remove the onboard CMOS battery, the CMOS bank of virtual EEPROM will lose all data.

Example

#include <EEPROM.h>
 
void setup()
{
  for (int i = 0; i < 200; i++)
    EEPROM.write(i, i);
}
 
void loop()
{
} 

See also


Libraries Reference Home

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

コメントする

上部へスクロール