File tree Expand file tree Collapse file tree 1 file changed +32
-2
lines changed
content/hardware/02.hero/boards/uno-r4-wifi/tutorials/eeprom Expand file tree Collapse file tree 1 file changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -50,13 +50,43 @@ There are several more methods available when working with EEPROM, and you can r
50
50
51
51
A minimal example on how to ** write** to the EEPROM can be found below:
52
52
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
+ ```
54
65
55
66
### EEPROM Read
56
67
57
68
A minimal example of how to ** read** from the EEPROM can be found below:
58
69
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
+ ```
60
90
61
91
## Summary
62
92
You can’t perform that action at this time.
0 commit comments