Results for “du”
Small, practical examples. Search by task or narrow things down below.
Round and format a decimal value
Round and format a decimal value in a complete Rust program using the standard library.
Rust✓ Tested
Run a first sketch and read serial output
Arduino / C: Run a first sketch and read serial output on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Saturate arithmetic at the type boundary
Saturate arithmetic at the type boundary in a complete Rust program using the standard library.
Rust✓ Tested
Search the stream for a message marker
Arduino / C: find consumes input through a matching marker or until timeout.
Arduino / C✓ Tested
Select a response with switch
Arduino / C: Select a response with switch on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Share state between sibling controls
Share state between sibling controls with a small React component and explicit browser behavior.
React✓ Tested
Smooth a sequence with an exponential filter
Arduino / C: Blend each sample with the previous filtered value.
Arduino / C✓ Tested
Sort a small array in place
Arduino / C: Insertion sort needs no additional array and is suitable for small datasets.
Arduino / C✓ Tested
Sort and remove repeated values
Sort and remove repeated values in a complete Rust program using the standard library.
Rust✓ Tested
Split a writable comma-delimited buffer
Arduino / C: strtok modifies its buffer and returns successive tokens.
Arduino / C✓ Tested
Stop receiving interrupts when a task finishes
Arduino / C: detachInterrupt removes the registered callback.
Arduino / C✓ Tested
Store a bounded null-terminated text setting
Arduino / C: Write a fixed buffer and explicitly terminate the retrieved copy.
Arduino / C✓ Tested