Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ColorDistanceSensor: What are those additional modes doing? #151

Open
dkurok opened this issue Mar 30, 2021 · 9 comments
Open

ColorDistanceSensor: What are those additional modes doing? #151

dkurok opened this issue Mar 30, 2021 · 9 comments
Labels
investigation Stuff to investigate question Further information is requested

Comments

@dkurok
Copy link
Contributor

dkurok commented Mar 30, 2021

@highstreeto
Do you know / found out hwat the additional modes of the 88007 do?
public byte ModeIndexIRTx { get; protected set; } = 7;
public byte ModeIndexSPEC1 { get; protected set; } = 8;
public byte ModeIndexDebug { get; protected set; } = 9;
public byte ModeIndexCalibration { get; protected set; } = 10;

IR sounds like Infrared; and it is an ouptput. Can we use it like an IR-control? Controlling PowerFunctions-devices?? That would be fun!

SPEC1 is neither input nor output according to "CLI device list" I have no idea! Sounds like "SPECIAL"

What can be done by calibration (input) on this device?

@dkurok
Copy link
Contributor Author

dkurok commented Mar 30, 2021

Just found something interesting about the SPEC 1-mode here:
Boost Color and Distance Sensor readings

@tthiery tthiery added investigation Stuff to investigate question Further information is requested labels Mar 30, 2021
@highstreeto
Copy link
Contributor

Not really. I played around a bit with CALIB, but it seems to just shut off when "triggering" this mode.
My current understanding is that the sensor does a self-calibration on startup, as it switches through different modes (indicated by the color) and maybe the CALIB mode is for getting the calibration values? (more testing required).

If I find more out, I will add it to my PR at the sharpbrick/docs repo.

@tthiery
Copy link
Member

tthiery commented Mar 30, 2021

I highly recommend not playing around with calibration call. Who knows what calibration procedure is executed in the LEGO facilities. Executed the wrong way, you might brick your brick 🙂

@tthiery
Copy link
Member

tthiery commented Mar 30, 2021

@dkurok you will find out that in most devices there are undocumented modes.

@dlech
Copy link

dlech commented Mar 30, 2021

Can we use it like an IR-control? Controlling PowerFunctions-devices?? That would be fun!

Yes, this is possible with both the official Powered Up Control+ app and Pybricks.

I think SPEC1 is just a precursor to the multi-mode stuff on newer sensors. It allows measuring multiple values at the same time.

@tthiery
Copy link
Member

tthiery commented Mar 30, 2021

@highstreeto May I present @dlech. He and his team are the level deeper and with some guys measuring the electric cables are the folks with the most knowledge outside of LEGO.

If you are interested in doing some stuff in this area, checkout their codebase, learn and apply it here and the docs repo ;)

@dlech As always, thanks for helping out!!!

@tthiery tthiery changed the title ColorDistancesensor: What are those additional modes doing? ColorDistanceSensor: What are those additional modes doing? Mar 30, 2021
@highstreeto
Copy link
Contributor

I highly recommend not playing around with calibration call. Who knows what calibration procedure is executed in the LEGO facilities. Executed the wrong way, you might brick your brick 🙂

Yeah, I just tested it once and never touched it again

Can we use it like an IR-control? Controlling PowerFunctions-devices?? That would be fun!

Yes, this is possible with both the official Powered Up Control+ app and Pybricks.

I think SPEC1 is just a precursor to the multi-mode stuff on newer sensors. It allows measuring multiple values at the same time.

Ah good to know. As I have no PF things, I cannot test/implement this.

@highstreeto May I present @dlech. He and his team are the level deeper and with some guys measuring the electric cables are the folks with the most knowledge outside of LEGO.

If you are interested in doing some stuff in this area, checkout their codebase, learn and apply it here and the docs repo ;)

@dlech As always, thanks for helping out!!!

Will do

@dkurok
Copy link
Contributor Author

dkurok commented Apr 1, 2021

@highstreeto & @tthiery
I would like to extend ColorDistanceSensor-device with the output-functions for
- Mode 5: Name: COL O, Symbol: IDX, Capability: Output (letting the LED of the device shine)
- Mode 7: Name: IR Tx, Symbol: N/A, Capability: Output (trying to get PF-motors/PF-devices to run; I've got enough of them)
and the reading of

  • Mode 8: Name: SPEC 1, Symbol: N/A, Capability: (this seems to be a one-go fetch of values for distance, color and reflection)

This would change ColordistanceSensor.cs and extend the example for the sensor.
Want to avoid two or more of us working on it.
So is there interest in it from your side that I do it or is someone else working on it?

@highstreeto
Copy link
Contributor

This would change ColordistanceSensor.cs and extend the example for the sensor.
Want to avoid two or more of us working on it.
So is there interest in it from your side that I do it or is someone else working on it?

No interset from my side, so go for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigation Stuff to investigate question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants