Dein Suchergebnis zum Thema: "index.html"

CS Discoveries | Changing Sensor Scale

https://studio.code.org/docs/csd/sensor_setScale/index.html

By default each of the analog sensors on the Circuit Playground converts their sensed data to a 10 bit number with a minimum value of 0 and a maximum of 1023. While this range provides the most detailed readings (since there are 1024 possible values), it’s not always the most useful range of numbers. If you want to use a sensor input to control rgb color, display a percentage, or otherwise want to constrain the potential values of the sensor inputs you’ll need to map the range of 0-1023 to another range.