diff --git a/src/extensions/scratch3_gdx_for/index.js b/src/extensions/scratch3_gdx_for/index.js index 88e6cca63..2e27d983c 100644 --- a/src/extensions/scratch3_gdx_for/index.js +++ b/src/extensions/scratch3_gdx_for/index.js @@ -38,6 +38,11 @@ const GDXFOR_SENSOR = { SPIN_SPEED_Z: 7 }; +/** + * The update rate, in milliseconds, for sensor data input from the peripheral. + */ +const GDXFOR_UPDATE_RATE = 100; + /** * Threshold for pushing and pulling force, for the whenForcePushedOrPulled hat block. * @type {number} @@ -226,7 +231,7 @@ class GdxFor { }); // Start device - this._device.start(10); // Set the period to 10 milliseconds + this._device.start(GDXFOR_UPDATE_RATE); }); }