FIND YOUR NEXT FEW LINES

Results for “serial”

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

155 snippets foundClear filters
Arduino / CGetting Started

Calculate with integer values

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

Arduino / C✓ Tested
Arduino / CGetting Started

Change an LED delay with a variable

Arduino / C: Assign a new value to a variable to change the next LED pulse duration.

Arduino / C✓ Tested
Arduino / CGetting Started

Check both ends of a range

Arduino / C: Check both ends of a range on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CEEPROM & program memory

Check EEPROM capacity before a write

Arduino / C: length reports the available address count for this board.

Arduino / C✓ Tested
Arduino / CGetting Started

Choose the smaller of two values

Arduino / C: Choose the smaller of two values on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CBinary values & packets

Clear a flag without affecting neighboring bits

Arduino / C: bitClear resets only the selected bit.

Arduino / C✓ Tested
Arduino / CText & bounded buffers

Compare a command case-sensitively

Arduino / C: strcmp returns zero when both null-terminated strings match.

Arduino / C✓ Tested
Arduino / CTiming & control

Compare elapsed time across timer rollover

Use unsigned subtraction when a millisecond counter wraps.

rollover✓ Tested
Arduino / CDigital input & output

Control an LED from a button

Translate an active-low button input into an LED output.

button✓ Tested
Arduino / CSensor calculations

Convert a supplied ADC count to volts

Arduino / C: Scale a ten-bit ADC count using an explicit reference voltage.

Arduino / C✓ Tested
Arduino / CSensor calculations

Convert Celsius to Fahrenheit

Arduino / C: Use floating-point constants to avoid integer division.

Arduino / C✓ Tested
Arduino / CEEPROM & program memory

Copy a flash string into a bounded RAM buffer

Arduino / C: strncpy_P reads from program memory into ordinary RAM.

Arduino / C✓ Tested