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/
BSD 3-Clause "New" or "Revised" License
1.2k stars 1.49k forks source link

EV3 Feature request: Enable IR sensors #1445

Open nekketsuuu opened 6 years ago

nekketsuuu commented 6 years ago

Expected Behavior

We can use 45509 EV3 Infrared Sensor in Scratch 3.0 EV3 extension.

Although 5003400 LEGO MINDSTORMS Education EV3 Core Set does not contain the IR sensor, 31313 MINDSTORMS EV3 for toys contains it. Moreover, the latter does not have the ultrasonic sensor. So I supposed the IR sensor can be used from the EV3 extension.

Actual Behavior

We cannot. The IR sensor can measure distance (or proximity), but distance block always shows zero.

Steps to Reproduce

  1. Connect one IR sensor to a EV3.
  2. Connect the EV3 to a computer using Bluetooth and Scratch Link on https://beta.scratch.mit.edu/.
  3. Try to read from the sensor using distance block.

Operating System and Browser

Windows 10 Home 1803, Google Chrome 68.0.3440.106 (Official build) (64 bit), 45509 EV3 Infrared Sensor I tested on https://beta.scratch.mit.edu/, on Aug 12, 2018.

thisandagain commented 6 years ago

/cc @ericrosenbaum @evhan55

jokuha commented 4 years ago

New to scratch (and still fairly new to EV3) – thank you for the efforts, my daughter and me love it.

Now, is there any chance to get the IR distance sensor working? It indeed still seems to be putting out zero distance no matter what(?).