Advertisement
pleasedontcode

EEPROM example

Aug 30th, 2024
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Arduino 0.32 KB | Source Code | 0 0
  1. #include <EEPROM.h>
  2.  
  3. void setup() {
  4.     Serial.begin(9600);
  5.  
  6.     // Write data to EEPROM
  7.     EEPROM.write(0, 123); // Write byte value 123 to address 0
  8.  
  9.     // Read data from EEPROM
  10.     int value = EEPROM.read(0); // Read byte value from address 0
  11.     Serial.println(value);
  12. }
  13.  
  14. void loop() {
  15.     // Your loop code
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement