Skip to content

Documented Serial Monitor output doesn't match the firmware #3

Description

@JakeTheRabbit

Documented Serial Monitor output does not match what the firmware actually prints

arduino/arduino-instructions.md and AGENTS.md show Serial Monitor examples that don't match arduino/PlantSensors/PlantSensors.ino. A builder following the hardware steps will see different output and may think something is broken.

1. Firmware emits 0–1 fractions, docs show 0–100

The firmware prints normalized fractions:

{"moisture":0.45,"light":1.00}

(updateSensors() uses Serial.print(moisture, 2) and Serial.print(light, 2).)

But the docs show already-scaled values as if they came straight from Serial Monitor:

{"moisture":45,"light":100}

(arduino-instructions.md "What you should see", and AGENTS.md step 6.)

The 0–100 scaling actually happens later in the browser (src/lib/plant/sensors.tsscaleHardwareFractions), not on the Arduino. The Serial Monitor examples should show fractions, or the text should make clear the 45/100 values are the browser-side representation.

2. light:99 is impossible

arduino-instructions.md includes {"moisture":45,"light":99}. The light sensor is binary; the firmware only ever outputs 0.00 or 1.00 (→ 0 or 100 after scaling). A value of 99 can't occur.

3. "raw value such as 200-400" before calibration

The docs say moisture "may be a larger raw value such as 200-400" before calibration. In normal mode the firmware always normalizes to 0–1; raw ADC counts only appear in calibrate mode.

4. Calibrate-mode output format

The docs show:

Raw: 398 | Calibrating... (type 'calibrate' again to exit)

The firmware actually prints JSON:

{"raw":398}

5. status doesn't print a firmware version

The serial protocol reference says status prints "firmware version and current settings". The status command prints serial_interval, air_value, and water_value only — there is no version field.

Suggested fix

Align the documented examples with the actual firmware output (fractions, JSON {"raw":...}, no version field, no light:99), or adjust the firmware to match the docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions