FIND YOUR NEXT FEW LINES

Results for “Serial.read”

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

591 snippets foundClear filters
JavaScriptObjects & JSON

Parse JSON text

Read a JavaScript object from JSON text.

JavaScript✓ Tested
Arduino / CDigital signals & interrupts

Play a fixed digital output pattern

Arduino / C: A pattern table separates the output sequence from its timing.

Arduino / C✓ Tested
PythonFunctions & error handling

Preconfigure some function arguments

Python: Use partial to produce a callable with selected arguments already bound.

Python✓ Tested
Arduino / CGetting Started

Preserve a fractional result

Arduino / C: Preserve a fractional result on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
C++Ordering & set operations

Preserve equal-key order while sorting records

C++: stable_sort retains encounter order for records whose selected sort keys compare equal.

C++✓ Tested
Arduino / CSensor calculations

Prevent output chatter with separate thresholds

Arduino / C: Use different on and off thresholds to retain state between them.

Arduino / C✓ Tested
Arduino / CGetting Started

Print a fixed text buffer

Arduino / C: Print a fixed text buffer on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CGetting Started

Print a label beside a number

Arduino / C: Combine Serial.print and Serial.println to put text and a value on one line.

Arduino / C✓ Tested
C++Getting Started

Print a number with two decimal places

C++: Format a small decimal value consistently for display.

C++✓ Tested
Arduino / CGetting Started

Print a single character

Arduino / C: Print a single character on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CGetting Started

Print once from setup

Arduino / C: Print once from setup on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
C#File operations & paths

Process a file as a lazy line sequence

C#: ReadLines avoids allocating one string containing the entire file.

C#✓ Tested