Results for “Arduino / C”
Small, practical examples. Search by task or narrow things down below.
Ignore small movements around a center value
Arduino / C: Values inside the deadband become zero while others keep their direction.
Arduino / C✓ Tested
Inspect a byte as hexadecimal
Arduino / C: Inspect a byte as hexadecimal on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Inspect a byte without consuming it
Arduino / C: peek leaves the next byte available for a later read.
Arduino / C✓ Tested
Interpolate between two calibration points
Arduino / C: Compute a fractional position before scaling to the output interval.
Arduino / C✓ Tested
Keep a counter from wrapping at its maximum
Arduino / C: Increment only when the value is below its limit.
Arduino / C✓ Tested
Maintain a rolling sum in a circular window
Arduino / C: Subtract the overwritten sample before adding the next one.
Arduino / C✓ Tested
Name a fixed configuration value
Arduino / C: Name a fixed configuration value on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Pack two small values into one byte
Arduino / C: Mask each four-bit value before combining it.
Arduino / C✓ Tested
Preserve a fractional result
Arduino / C: Preserve a fractional result on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Prevent output chatter with separate thresholds
Arduino / C: Use different on and off thresholds to retain state between them.
Arduino / C✓ Tested
Print a single character
Arduino / C: Print a single character on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Print once from setup
Arduino / C: Print once from setup on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested