Results for “ring”
Small, practical examples. Search by task or narrow things down below.
Count a rising edge with an interrupt
Arduino / C: RISING triggers when the input changes from low to high.
Arduino / C✓ Tested
Count down with a bounded loop
Arduino / C: Count down with a bounded loop on an Uno with the Serial Monitor set to 9600 baud.
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
Count rows per category
Aggregate rows sharing the same category.
GROUP BY✓ Tested
Count set bits in an unsigned integer
C: Clearing the lowest set bit on each iteration counts only one iteration per set bit.
C✓ Tested
Debounce a button with a stable-time check
Accept an input change only after it stays stable for 30 ms.
debounce✓ Tested
Decode hexadecimal bytes
C#: FromHexString and ToHexString handle binary data without manually parsing pairs of characters.
C#✓ Tested
Detect NaN without converting the input
JavaScript: Number.isNaN tests the special numeric value instead of applying string-to-number conversion.
JavaScript✓ Tested
Detect NaN without converting the input
TypeScript: Number.isNaN tests the special numeric value instead of applying string-to-number conversion.
TypeScript✓ Tested
Detect truncated formatted output
Arduino / C: snprintf returns the length it would have written, excluding the null terminator.
Arduino / C✓ Tested
Dispatch a command through function pointers
Arduino / C: A small function table can map validated command indices to actions.
Arduino / C✓ Tested
Dispatch a one-character serial command
Arduino / C: A switch provides explicit handling for accepted and unknown commands.
Arduino / C✓ Tested