From 0577491a8c71b89ced51ae8927eca9edcaf8b248 Mon Sep 17 00:00:00 2001 From: Nathan Kellenicki Date: Tue, 14 Sep 2021 21:13:32 -0700 Subject: [PATCH] Technic 3x3 Light Matrix support --- README.md | 6 +- docs/AbsoluteMotor.html | 2 +- docs/BaseHub.html | 22 +- docs/BasicMotor.html | 2 +- docs/ColorDistanceSensor.html | 2 +- docs/CurrentSensor.html | 2 +- docs/Device.html | 2 +- docs/DuploTrainBase.html | 20 +- docs/DuploTrainBaseColorSensor.html | 2 +- docs/DuploTrainBaseMotor.html | 2 +- docs/DuploTrainBaseSpeaker.html | 2 +- docs/DuploTraniBaseSpeedometer.html | 2 +- docs/Hub.html | 3635 ++++++++++++++++- docs/HubLED.html | 2 +- docs/LPF2Hub.html | 20 +- docs/Light.html | 2 +- docs/Mario.html | 20 +- docs/MarioAccelerometer.html | 2 +- docs/MarioBarcodeSensor.html | 2 +- docs/MarioPantsSensor.html | 2 +- docs/MediumLinearMotor.html | 2 +- docs/MotionSensor.html | 2 +- docs/MoveHub.html | 20 +- docs/MoveHubMediumLinearMotor.html | 2 +- docs/MoveHubTiltSensor.html | 2 +- docs/PiezoBuzzer.html | 2 +- docs/PoweredUP.html | 66 +- docs/RemoteControl.html | 20 +- docs/RemoteControlButton.html | 2 +- docs/SimpleMediumLinearMotor.html | 2 +- docs/TachoMotor.html | 2 +- docs/Technic3x3ColorLightMatrix.html | 1181 ++++++ docs/TechnicColorSensor.html | 2 +- docs/TechnicDistanceSensor.html | 2 +- docs/TechnicForceSensor.html | 2 +- docs/TechnicLargeAngularMotor.html | 2 +- docs/TechnicLargeLinearMotor.html | 2 +- docs/TechnicMediumAngularMotor.html | 2 +- docs/TechnicMediumHub.html | 20 +- docs/TechnicMediumHubAccelerometerSensor.html | 2 +- docs/TechnicMediumHubGyroSensor.html | 2 +- docs/TechnicMediumHubTiltSensor.html | 2 +- docs/TechnicSmallAngularMotor.html | 2073 ++++++++++ docs/TechnicXLargeLinearMotor.html | 2 +- docs/TiltSensor.html | 2 +- docs/TrainMotor.html | 2 +- docs/VoltageSensor.html | 2 +- docs/WeDo2SmartHub.html | 20 +- docs/consts.js.html | 8 +- docs/devices_absolutemotor.js.html | 2 +- docs/devices_basicmotor.js.html | 2 +- docs/devices_colordistancesensor.js.html | 2 +- docs/devices_currentsensor.js.html | 2 +- docs/devices_device.js.html | 2 +- .../devices_duplotrainbasecolorsensor.js.html | 2 +- docs/devices_duplotrainbasemotor.js.html | 2 +- docs/devices_duplotrainbasespeaker.js.html | 2 +- .../devices_duplotrainbasespeedometer.js.html | 2 +- docs/devices_hubled.js.html | 2 +- docs/devices_light.js.html | 2 +- docs/devices_marioaccelerometer.js.html | 2 +- docs/devices_mariobarcodesensor.js.html | 2 +- docs/devices_mariopantssensor.js.html | 2 +- docs/devices_mediumlinearmotor.js.html | 2 +- docs/devices_motionsensor.js.html | 2 +- docs/devices_movehubmediumlinearmotor.js.html | 2 +- docs/devices_movehubtiltsensor.js.html | 2 +- docs/devices_piezobuzzer.js.html | 2 +- docs/devices_remotecontrolbutton.js.html | 2 +- docs/devices_simplemediumlinearmotor.js.html | 2 +- docs/devices_tachomotor.js.html | 2 +- ...devices_technic3x3colorlightmatrix.js.html | 190 + docs/devices_techniccolorsensor.js.html | 2 +- docs/devices_technicdistancesensor.js.html | 2 +- docs/devices_technicforcesensor.js.html | 2 +- docs/devices_techniclargeangularmotor.js.html | 2 +- docs/devices_techniclargelinearmotor.js.html | 2 +- .../devices_technicmediumangularmotor.js.html | 2 +- ...echnicmediumhubaccelerometersensor.js.html | 2 +- ...devices_technicmediumhubgyrosensor.js.html | 2 +- ...devices_technicmediumhubtiltsensor.js.html | 2 +- docs/devices_technicsmallangularmotor.js.html | 148 + docs/devices_technicxlargelinearmotor.js.html | 2 +- docs/devices_tiltsensor.js.html | 2 +- docs/devices_trainmotor.js.html | 2 +- docs/devices_voltagesensor.js.html | 2 +- docs/global.html | 48 +- docs/hubs_basehub.js.html | 6 +- docs/hubs_duplotrainbase.js.html | 2 +- docs/hubs_hub.js.html | 2 +- docs/hubs_lpf2hub.js.html | 2 +- docs/hubs_mario.js.html | 2 +- docs/hubs_movehub.js.html | 2 +- docs/hubs_remotecontrol.js.html | 2 +- docs/hubs_technicmediumhub.js.html | 4 +- docs/hubs_technicsmallhub.js.html | 177 + docs/hubs_wedo2smarthub.js.html | 2 +- docs/index.html | 31 +- docs/poweredup-browser.js.html | 11 +- docs/poweredup-node.js.html | 6 +- examples/light_matrix.js | 37 + src/color.ts | 20 + src/devices/technic3x3colorlightmatrix.ts | 64 + src/hubs/basehub.ts | 2 + src/index-browser.ts | 5 + src/index-node.ts | 5 + 106 files changed, 7739 insertions(+), 300 deletions(-) create mode 100644 docs/Technic3x3ColorLightMatrix.html create mode 100644 docs/TechnicSmallAngularMotor.html create mode 100644 docs/devices_technic3x3colorlightmatrix.js.html create mode 100644 docs/devices_technicsmallangularmotor.js.html create mode 100644 docs/hubs_technicsmallhub.js.html create mode 100644 examples/light_matrix.js create mode 100644 src/color.ts create mode 100644 src/devices/technic3x3colorlightmatrix.ts diff --git a/README.md b/README.md index 52a66da..f681b37 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ LEGO Powered Up is the successor to Power Functions, the system for adding elect * LEGO Powered Up * LEGO Technic CONTROL+ * LEGO Education SPIKE Prime +* LEGO Education SPIKE Essential * LEGO Mindstorms Robot Inventor Other products that speak the Powered Up protocol include the Duplo App-Controlled trains and LEGO Super Mario, both of which are compatible with this library. @@ -55,6 +56,8 @@ While most Powered Up components and Hubs are compatible with each other, there | SPIKE Prime Color Sensor | 45678 | Sensor | No | No | Yes | Yes | 45678 | | SPIKE Prime Distance Sensor | 45678 | Sensor | No | No | Yes | Yes | 45678 | | SPIKE Prime Force Sensor | 45678 | Sensor | *Partial* | Yes | Yes | Yes | 45678 | +| SPIKE Essential Small Motor | 45607 | Motor/Sensor | *Partial* | No | Yes | Yes | 45345 | +| SPIKE Essential 3x3 Color Matrix | 45608 | Motor/Sensor | *Partial* | No | Yes | Yes | 45345 | In addition, the Hubs themselves have certain built-in features which this library exposes. @@ -68,6 +71,7 @@ In addition, the Hubs themselves have certain built-in features which this libra | Duplo Train Base | 28743 | RGB LED/Headlights
Speaker
Speedometer
Motor
Color and Distance Sensor
Button | 10874
10875 | | Control+ Hub | 22127 | RGB LED
Button
Tilt Sensor
Accelerometer | 42099
42100 | | Super Mario | 71360 | Pants Sensor
Barcode and Color Sensor | 71360 | +| SPIKE Essential Hub | 45609 | RGB LED
Button
Tilt Sensor
Accelerometer | AbsoluteMotor
  • BaseHub
  • BasicMotor
  • ColorDistanceSensor
  • CurrentSensor
  • Device
  • DuploTrainBase
  • DuploTrainBaseColorSensor
  • DuploTrainBaseMotor
  • DuploTrainBaseSpeaker
  • DuploTraniBaseSpeedometer
  • Hub
  • HubLED
  • Light
  • LPF2Hub
  • Mario
  • MarioAccelerometer
  • MarioBarcodeSensor
  • MarioPantsSensor
  • MediumLinearMotor
  • MotionSensor
  • MoveHub
  • MoveHubMediumLinearMotor
  • MoveHubTiltSensor
  • PiezoBuzzer
  • PoweredUP
  • RemoteControl
  • RemoteControlButton
  • SimpleMediumLinearMotor
  • TachoMotor
  • TechnicColorSensor
  • TechnicDistanceSensor
  • TechnicForceSensor
  • TechnicLargeAngularMotor
  • TechnicLargeLinearMotor
  • TechnicMediumAngularMotor
  • TechnicMediumHub
  • TechnicMediumHubAccelerometerSensor
  • TechnicMediumHubGyroSensor
  • TechnicMediumHubTiltSensor
  • TechnicXLargeLinearMotor
  • TiltSensor
  • TrainMotor
  • VoltageSensor
  • WeDo2SmartHub
  • +

    Classes

    diff --git a/docs/BaseHub.html b/docs/BaseHub.html index a19d017..79ddaab 100644 --- a/docs/BaseHub.html +++ b/docs/BaseHub.html @@ -73,7 +73,7 @@ -

    Classes

    +

    Classes

    @@ -161,7 +161,7 @@
    @@ -316,7 +316,7 @@
    @@ -437,7 +437,7 @@
    @@ -558,7 +558,7 @@
    @@ -679,7 +679,7 @@
    @@ -800,7 +800,7 @@
    @@ -921,7 +921,7 @@
    @@ -1042,7 +1042,7 @@
    @@ -1163,7 +1163,7 @@
    @@ -1284,7 +1284,7 @@
    diff --git a/docs/BasicMotor.html b/docs/BasicMotor.html index 49bc090..e0862eb 100644 --- a/docs/BasicMotor.html +++ b/docs/BasicMotor.html @@ -73,7 +73,7 @@ -

    Classes

    +

    Classes

    diff --git a/docs/ColorDistanceSensor.html b/docs/ColorDistanceSensor.html index 4346972..3c18b40 100644 --- a/docs/ColorDistanceSensor.html +++ b/docs/ColorDistanceSensor.html @@ -73,7 +73,7 @@ -

    Classes

    +

    Classes

    diff --git a/docs/CurrentSensor.html b/docs/CurrentSensor.html index 8aec784..97e07b9 100644 --- a/docs/CurrentSensor.html +++ b/docs/CurrentSensor.html @@ -73,7 +73,7 @@ -

    Classes

    +

    Classes

    diff --git a/docs/Device.html b/docs/Device.html index c5e0bb3..a31a6ea 100644 --- a/docs/Device.html +++ b/docs/Device.html @@ -73,7 +73,7 @@ -

    Classes

    +

    Classes

    diff --git a/docs/DuploTrainBase.html b/docs/DuploTrainBase.html index d44dff3..e2edcab 100644 --- a/docs/DuploTrainBase.html +++ b/docs/DuploTrainBase.html @@ -73,7 +73,7 @@ -

    Classes

    +

    Classes

    @@ -331,7 +331,7 @@
    @@ -461,7 +461,7 @@
    @@ -591,7 +591,7 @@
    @@ -721,7 +721,7 @@
    @@ -851,7 +851,7 @@
    @@ -981,7 +981,7 @@
    @@ -1111,7 +1111,7 @@
    @@ -1241,7 +1241,7 @@
    @@ -1371,7 +1371,7 @@
    diff --git a/docs/DuploTrainBaseColorSensor.html b/docs/DuploTrainBaseColorSensor.html index c58f3a7..1031bde 100644 --- a/docs/DuploTrainBaseColorSensor.html +++ b/docs/DuploTrainBaseColorSensor.html @@ -73,7 +73,7 @@ -

    Classes

    +

    Classes

    diff --git a/docs/DuploTrainBaseMotor.html b/docs/DuploTrainBaseMotor.html index 43a4d39..5b1a98d 100644 --- a/docs/DuploTrainBaseMotor.html +++ b/docs/DuploTrainBaseMotor.html @@ -73,7 +73,7 @@ -

    Classes

    +

    Classes

    diff --git a/docs/DuploTrainBaseSpeaker.html b/docs/DuploTrainBaseSpeaker.html index 4c5009f..87c14e3 100644 --- a/docs/DuploTrainBaseSpeaker.html +++ b/docs/DuploTrainBaseSpeaker.html @@ -73,7 +73,7 @@ -

    Classes

    +

    Classes

    diff --git a/docs/DuploTraniBaseSpeedometer.html b/docs/DuploTraniBaseSpeedometer.html index 85393e1..0e2ead7 100644 --- a/docs/DuploTraniBaseSpeedometer.html +++ b/docs/DuploTraniBaseSpeedometer.html @@ -73,7 +73,7 @@ -

    Classes

    +

    Classes

    diff --git a/docs/Hub.html b/docs/Hub.html index 26c1eca..835173e 100644 --- a/docs/Hub.html +++ b/docs/Hub.html @@ -73,7 +73,7 @@ -

    Classes

    +

    Classes

    @@ -298,8 +298,10 @@ -
    Inherited From:
    -
    + + +
    Overrides:
    +