Skip to content

Commit cd3dc8a

Browse files
committed
Update eeprom.md
1 parent 1488cae commit cd3dc8a

File tree

1 file changed

+32
-2
lines changed
  • content/hardware/02.hero/boards/uno-r4-wifi/tutorials/eeprom

1 file changed

+32
-2
lines changed

content/hardware/02.hero/boards/uno-r4-wifi/tutorials/eeprom/eeprom.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,43 @@ There are several more methods available when working with EEPROM, and you can r
5050

5151
A minimal example on how to **write** to the EEPROM can be found below:
5252

53-
<CodeBlock url="https://github.com/arduino/ArduinoCore-renesas/blob/main/libraries/EEPROM/examples/eeprom_write/eeprom_write.ino" className="arduino"/>
53+
```arduino
54+
#include <EEPROM.h>
55+
56+
int addr = 0;
57+
byte value = 100;
58+
59+
void setup() {
60+
EEPROM.write(addr, value);
61+
}
62+
void loop(){
63+
}
64+
```
5465

5566
### EEPROM Read
5667

5768
A minimal example of how to **read** from the EEPROM can be found below:
5869

59-
<CodeBlock url="https://github.com/arduino/ArduinoCore-renesas/blob/main/libraries/EEPROM/examples/eeprom_read/eeprom_read.ino" className="arduino"/>
70+
```arduino
71+
#include <EEPROM.h>
72+
73+
int addr = 0;
74+
byte value;
75+
76+
void setup() {
77+
Serial.begin(9600);
78+
value = EEPROM.read(addr);
79+
while (!Serial) {
80+
81+
}
82+
83+
Serial.print("Address 0: ");
84+
Serial.println(value);
85+
}
86+
87+
void loop() {
88+
}
89+
```
6090

6191
## Summary
6292

0 commit comments

Comments
 (0)