FIND YOUR NEXT FEW LINES

Results for “Serial.available”

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

307 snippets foundClear filters
Bash ScriptsFunction scope & composition

Load functions from a trusted local script

Bash Scripts: Source executes a file in the current shell so its function definitions remain available.

Bash Scripts✓ Tested
Docker / ComposeCompose service options

Load service variables from an env file

Docker / Compose: env_file supplies runtime environment values.

Docker / Compose✓ Tested
Arduino / CSensor calculations

Maintain a rolling sum in a circular window

Arduino / C: Subtract the overwritten sample before adding the next one.

Arduino / C✓ Tested
Docker / ComposeGetting Started

Make a Compose service’s filesystem read-only

Docker / Compose: Make a Compose service’s filesystem read-only in a small Compose file.

Docker / Compose✓ Tested
Arduino / CData & storage

Map an input range to an output range

Scale an integer reading to a different interval.

map✓ Tested
Arduino / CTiming & control

Measure a short delay with micros

Measure elapsed microseconds around a short operation.

micros✓ Tested
JavaEncoding & structured values

Measure UTF-8 bytes separately from characters

Java: Encode a Java string before measuring its serialized byte length.

Java✓ Tested
Docker / ComposeStorage & isolation

Mount a host directory read-only

Expose existing files without allowing the container to change them.

bind mount✓ Tested
Docker / ComposeCompose service options

Mount a local input directory with long syntax

Docker / Compose: Long mount syntax makes the bind type and read-only intent explicit.

Docker / Compose✓ Tested
Arduino / CGetting Started

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
Docker / ComposeCompose service options

Override an env-file value explicitly

Docker / Compose: The environment section takes precedence over env_file.

Docker / Compose✓ Tested
Docker / ComposeExecution & file transfer

Override an image’s entrypoint at runtime

Docker / Compose: An explicit entrypoint replaces the image entrypoint for this invocation.

Docker / Compose✓ Tested