If you want to obtain a single value that is not a percentage then use Sensor.ReadRawValue(port number, index). For example, the ultrasound sensor in mode 0 returns an integer value in the range 0-2550(?) which represents the distance to the reflecting object in mm, and the color sensor in mode 2, 'detect colors', returns a color code from 0-7 (0=unknown, 1=black etc).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
June 2023
Categories |