FIND YOUR NEXT FEW LINES

Results for “Serial.read”

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

591 snippets foundClear filters
C++Getting Started

Divide using a fractional number

C++: Use a floating-point operand to preserve the fractional part of a division.

C++✓ Tested
Arduino / CDigital signals & interrupts

Drive the built-in LED low after turning it on

Arduino / C: digitalWrite changes the actual output level of a configured pin.

Arduino / C✓ Tested
Arduino / CBinary values & packets

Encode a value as little-endian bytes

Arduino / C: Store the least significant byte first when the protocol requires it.

Arduino / C✓ Tested
C#JSON & binary formats

Enumerate the items of a JSON array

C#: Dispose JsonDocument after reading its elements.

C#✓ Tested
Arduino / CGetting Started

Explain a sketch with comments

Arduino / C: Use single-line and block comments to document what a sketch does.

Arduino / C✓ Tested
SQLiteJSON data

Extract a JSON field

Read a scalar value from JSON text.

json_extract✓ Tested
Arduino / CText & bounded buffers

Extract a section of an Arduino String

Arduino / C: substring includes the start index and excludes the end index.

Arduino / C✓ Tested
C++Text validation & parsing

Extract a substring with an explicit count

C++: The second substr argument is a length rather than an ending index.

C++✓ Tested
PostgresDates & series

Extract part of a date

Read a calendar component with EXTRACT.

EXTRACT✓ Tested
Arduino / CBinary values & packets

Extract the low and high byte of a value

Arduino / C: lowByte and highByte expose the two bytes of a 16-bit value.

Arduino / C✓ Tested
Arduino / CGetting Started

Find a division remainder

Arduino / C: Find a division remainder on an Uno with the Serial Monitor set to 9600 baud.

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

Find a median element without fully sorting

C++: nth_element partitions around the element that would occupy the chosen sorted position.

C++✓ Tested