Results for “flash”
Small, practical examples. Search by task or narrow things down below.
Copy a flash string into a bounded RAM buffer
Arduino / C: strncpy_P reads from program memory into ordinary RAM.
Arduino / C✓ Tested
Count five LED flashes with a for loop
Arduino / C: Repeat an LED action a known number of times and print the current count.
Arduino / C✓ Tested
Keep a serial message in flash memory
Arduino / C: The F macro keeps a literal out of scarce SRAM.
Arduino / C✓ Tested
Keep fixed text in flash memory
Arduino / C: Keep fixed text in flash memory on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Read 16-bit values from a flash table
Arduino / C: pgm_read_word retrieves a complete word from program memory.
Arduino / C✓ Tested
Read a byte lookup table from flash
Arduino / C: PROGMEM tables require the AVR program-memory access functions.
Arduino / C✓ Tested
Read and total a flash lookup table
Arduino / C: Array size can be computed at compile time even for a flash-resident table.
Arduino / C✓ Tested
Give an LED pin a constant name
Arduino / C: Use const to name the built-in LED pin and reuse it in output instructions.
Arduino / C✓ Tested
Reuse an LED action with a function
Arduino / C: Put a short LED sequence in a named function and call it twice.
Arduino / C✓ Tested