Skip to content

[Feature] Implement NXT color sensor checksum #2607

Closed

Description

@laurensvalk

Is your feature request related to a problem? Please describe.
We receive information from the NXT Color Sensor here:

https://github.com/pybricks/pybricks-micropython/blob/d811a706da236068983aff9ecefc6465a50b06c6/lib/pbio/src/port_dcm_ev3.c#L402-L420

There is a note there saying:

        // REVISIT: Test checksum and exit on failure.

We have not yet done this, but may want to after all, to catch cases like #2601.

At the top of this file, set #define DEBUG 1 (instead of 0), to get debug prints in the Pybricks Code output pane for easy debugging.

What to do?

  • In pbio_port_dcm_nxt_color_sensor_state_t add a field crc.
  • In the loop that says Receive all calibration info, update this CRC as it comes in.
  • After the loop, Compare it to the crc field in pbio_port_dcm_nxt_color_sensor_data_t.
  • Return PBIO_ERROR_IO if they do not match.

Activity

  1. added
    platform: EV3
    topic: sensors
    on Mar 2, 2026
  2. laurensvalk commented on Mar 2, 2026

    @laurensvalk
    MemberAuthor

    This is a relatively simple issue for anyone who is able to build the firmware. All you need is an EV3 brick and an NXT color sensor.

    We will leave this open for a week. Let us know if you're interested in contributing. We're happy to help you!

  3. added
    help wanted
    on Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedplatform: EV3topic: sensors

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions