scratchfoundation / scratch-vm

Virtual Machine used to represent, run, and maintain the state of programs for Scratch 3.0
http://scratchfoundation.github.io/scratch-vm/
GNU Affero General Public License v3.0
1.22k stars 1.53k forks source link

EV3: Show the unit of `distance` block #1444

Open nekketsuuu opened 6 years ago

nekketsuuu commented 6 years ago

Expected Behavior

Actual Behavior

distance block always returns a value between 0 and 100.

The ultrasonic sensor can measure distances between 1 cm and 255 cm, and also between 1 in and 100 in. In Japan, we rarely measure distances in inches. So I (Japanese) suspected distance returns distances in centimeters, but it doesn't.

I also suspected distance block returns in percentile. But without any units, it's unclear that "100" indicates the upper limit of a sensor.

So my issues and requests are:

  1. Make the unit of distance clear.
  2. If the Scratch Team decided to measure distances in inches, make a option to measure it in centimeters.

Steps to Reproduce

  1. Connect one ultrasonic sensor to a EV3.
  2. Connect the EV3 to a computer using Bluetooth and Scratch Link.
  3. Enable EV3 extension on https://beta.scratch.mit.edu/ and use distance block.

Operating System and Browser

Windows 10 Home 1803, Google Chrome 68.0.3440.106 (Official build) (64 bit), LEGO MINDSTORMS Education EV3 Core Set I tested on https://beta.scratch.mit.edu/, on Aug 12, 2018.

thisandagain commented 6 years ago

/cc @ericrosenbaum @evhan55