Arduino reading and writing string to EEPROM
读取和写入任何结构EEPROM
#include <EEPROM.h> template <class T> int EEPROM_writeAnything(int ee, const T& value) template <class T> int EEPROM_readAnything(int ee, T& value) |
#include <EEPROM.h>
#include "EEPROMAnything.h" struct config_t
{ long alarm; int mode; } configuration; void setup()
{ EEPROM_readAnything(0, configuration); // ... } void loop() { // let the user adjust their alarm settings // let the user adjust their mode settings // ... // if they push the "Save" button, save their configuration
if (digitalRead(13) == HIGH) EEPROM_writeAnything(0, configuration); } |
#include <avr/eeprom.h> struct settings_t void setup() // if they push the "Save" button, save their configuration |
Backing Up Raspberry Pi SD card
- Insert SD card to computer
- Launch Win32 Disk Imager
- Select Device (source) which you want to backup from
- Under Image File, give it a file name as shown in figure below

- Click Read button to start backing up
- As shown in figure below, the image file size is equivalent to the size of SD card since I had resized the partition of my SD card

Running raspi-config anytime anywhere
sudo raspi-config