Results for “Serial.available”
Small, practical examples. Search by task or narrow things down below.
Copy a string with a guaranteed terminator
Arduino / C: Reserve one character for the terminator when copying a bounded string.
Arduino / C✓ Tested
Copy an artifact from an earlier build stage
Docker / Compose: A named stage can produce an artifact without copying its other files.
Docker / Compose✓ Tested
Count a button’s falling edge in the main loop
Arduino / C: Compare each reading with the previous state to detect transitions.
Arduino / C✓ Tested
Count a falling edge with an interrupt
Increment a counter when an external input changes.
attachInterrupt✓ Tested
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
Create a network marked for internal connectivity
Docker / Compose: The internal option disables normal external routing for that network.
Docker / Compose✓ Tested
Create a recovery branch for a recently moved commit
Git: The reflog can identify a previous local HEAD position while its entry and objects remain available.
Git✓ Tested
Create a runtime file during the build
Docker / Compose: RUN executes during the build while CMD executes when a container starts.
Docker / Compose✓ Tested
Create a small file at build time
Docker / Compose: Create a small file at build time with a complete introductory Dockerfile.
Docker / Compose✓ Tested
Create a STRICT table
Require values compatible with declared column types.
STRICT✓ Tested