Arduino · Intermediate · Stufe 17 / 40
Storing Data: EEPROM, SD Cards and File Formats
Keep settings and measurements across power loss and log data safely to removable storage.
Intermediate freischalten · CHF 19.90 Stufen 14–26, einmalig, kein Abo
10 Lektionen in dieser Stufe
- Internal EEPROM: Bytes That Survive Power Loss
Read and write single bytes of the ATmega328P's 1 kB non-volatile memory. · Lab: Count power-ups in EEPROM and display the count at each start. - Storing Structs with EEPROM.put and EEPROM.get
Save and restore whole settings records in one call. · Lab: Store brightness, interval and a name and reload them at start-up. - Write Endurance and Wear-Reducing Strategies
Respect the limited number of write cycles and write only when needed. · Lab: Compare write counts of naive saving with update-on-change and delayed saving. - Validating Stored Settings with a Version Byte and CRC
Detect blank, outdated or corrupted data and fall back to defaults. · Lab: Add a version and CRC to the settings block and corrupt one byte to test recovery. - microSD Cards: Wiring, Voltage and FAT Formatting
Connect a card module safely and prepare a card the library can read. · Lab: Initialise the card and print its type and size. - Creating, Appending and Reading Files
Open files in the right mode and close them properly. · Lab: Write lines to a file, read them back and list the card's directory. - CSV Logging with Real-Time Clock Timestamps
Produce spreadsheet-ready files with a header and ISO timestamps. · Lab: Log temperature, humidity and pressure every ten seconds and open the file in a spreadsheet. - Surviving Power Cuts: Flush Intervals and File Rotation
Limit data loss on sudden power-off and keep files small by rotating them daily. · Lab: Pull power during logging and check how much data survived with different flush settings. - Reading Configuration Files from the Card
Parse simple key and value text so users can change settings without reprogramming. · Lab: Read logging interval and device name from a config file with defaults for missing keys. - External I2C EEPROM and FRAM for Larger Data
Add non-volatile memory beyond the internal 1 kB and compare endurance and speed. · Lab: Write and verify a 1 kB block on both chips and time the operations.
Abschlussprojekt
A stand-alone environmental data logger with timestamped CSV files, a validated settings block and safe behaviour on power loss.
Teile für diese Stufe
- 1 × UNO-compatible board
- 1 × USB cable matching the board
- 1 × Solderless breadboard 830 points
- 1 × Jumper wire set male-male and male-female
- 1 × microSD card module with level shifting
- 1 × microSD card 8–32 GB
- 1 × DS3231 real-time clock module with battery
- 1 × BME280 pressure, humidity and temperature module
- 1 × I2C EEPROM module 24LC256
- 1 × I2C FRAM module
- 2 × Tactile push button
- 2 × LED 5 mm assorted
- 2 × Resistor 220 ohm
- 1 × OLED display 0.96 inch I2C 128x64
In jeder Lektion legst du die passenden Teile direkt in den Warenkorb. Arduino-kompatibel →
Voraussetzung: Levels 1–16: structs, I2C and SPI devices, real-time clock and state machines.