Results for “Serial.available”
Small, practical examples. Search by task or narrow things down below.
Apply a linear sensor calibration
Arduino / C: Convert a raw reading using an offset and scale measured for the sensor.
Arduino / C✓ Tested
Assemble a big-endian 16-bit value
Arduino / C: Cast to an unsigned 16-bit type before shifting the high byte.
Arduino / C✓ Tested
Assign a bit from a Boolean state
Arduino / C: bitWrite accepts a bit position and a zero or nonzero value.
Arduino / C✓ Tested
Assign a network-scoped alias
Docker / Compose: An alias gives an endpoint an additional name on that network.
Docker / Compose✓ Tested
Attach a descriptive label to a container
Docker / Compose: Attach a descriptive label to a container using a locally available Ubuntu image.
Docker / Compose✓ Tested
Attach an existing container to another network
Docker / Compose: network connect adds an attachment without recreating the container.
Docker / Compose✓ Tested
Attach containers to a user-defined network
Create a dedicated network for a small group of containers.
network✓ Tested
Average a fixed set of readings
Accumulate sample values without overflowing a 16-bit total.
array✓ Tested
Blink the built-in LED three times
Alternate the built-in LED with a short blocking delay.
blink✓ Tested
Blink without blocking the loop
Use elapsed millis time instead of delay for a repeating action.
millis✓ Tested
Branch on a threshold
Arduino / C: Branch on a threshold on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Build an image with a default command
Docker / Compose: Build an image with a default command with a complete introductory Dockerfile.
Docker / Compose✓ Tested