FIND YOUR NEXT FEW LINES

Results for “Arduino / C”

Small, practical examples. Search by task or narrow things down below.

3000 snippets foundClear filters
Arduino / CEEPROM & program memory

Store a bounded null-terminated text setting

Arduino / C: Write a fixed buffer and explicitly terminate the retrieved copy.

Arduino / C✓ Tested
Arduino / CGetting Started

Store a small unsigned value

Arduino / C: Store a small unsigned value on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CGetting Started

Store an integer reading

Arduino / C: Store an integer reading on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CEEPROM & program memory

Store and retrieve a multibyte integer

Arduino / C: put and get copy the bytes of a typed value.

Arduino / C✓ Tested
Arduino / CArrays & embedded state

Store samples in a fixed-size ring buffer

Arduino / C: The write position wraps while the storage size stays constant.

Arduino / C✓ Tested
Arduino / CGetting Started

Store several readings in an array

Arduino / C: Store several readings in an array on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CBinary values & packets

Toggle a bit with an XOR mask

Arduino / C: XOR flips selected bits and leaves all other bits unchanged.

Arduino / C✓ Tested
Arduino / CGetting Started

Understand setup() and loop()

Arduino / C: See initialization run once and the main loop run repeatedly.

Arduino / C✓ Tested
Arduino / CGetting Started

Visit every reading in a fixed array

Arduino / C: Visit every reading in a fixed array on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CTiming & control

Blink without blocking the loop

Use elapsed millis time instead of delay for a repeating action.

millis✓ Tested
Arduino / CSerial communication

Collect a serial line in a fixed buffer

Read a short command without dynamic String allocation.

serial line✓ Tested
Arduino / CTiming & control

Compare elapsed time across timer rollover

Use unsigned subtraction when a millisecond counter wraps.

rollover✓ Tested