Skip to content

[Bug] Infraredsensor non lego #2223

@20100Lego

Description

@20100Lego

Describe the bug
What is the problem?
I'm doing some advanced programming with Pybrick (thanks to you!) like a GBC module that writes text with the ball.
I saw that the infrared sensor has a class for measuring brightness. I bought a non-Lego infrared sensor (Aliexpress), it works as a distance sensor in the poweredup application. In pybricks if I do sensor = InfraredSensor (Port.A), the script blocks and doesn't go any further, it doesn't output as an error.
Do you think it's possible to integrate these sensors to make them pybricks compatible?
I'm a computer scientist, I can do tests to determine what the sensor returns on initialisation if you provide me with debugging/testing tools.
It would be great if it worked!
Thanks in advance!

To reproduce
Steps to reproduce the behavior:

  1. Connect an unofficial Infraredsensor sensor
  2. Try to connect sensor = InfraredSensor (Port.A
  3. Script does not go ahead

Expected behavior
What did you expect to happen instead?
Sensor sends value

Screenshots
There is a saying that a picture is worth a 1000 words. Screenshots really help to identify and solve problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    supportRequest for technical support for a problem that is not a bug or feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions