Lego powered up программирование

Обновлено: 18.04.2024

Новый набор Lego Boost — это набор, в который входят двигатель, программируемый блок, комбинированный датчик цвета и расстояния. Эти детали позволяют превратить детали из старых наборов LEGO в «умные» программируемые игрушки. Кроме того в состав конструктора входят 843 пластиковые детали — LEGO-кирпичей никогда не бывает много.

В набор входят инструкции по созданию пяти моделей:

Робот Vernie (Vernie the Robot).
Кошка Frankie (Frankie the Cat).
Гитара (the Guitar 4000).
Вездеход M.T.R.4 (the Multi-Tool Rover 4).
Автосборочная линия (the Autobuilder).

Move Hub features Bluetooth Low Energy (BLE) connectivity, 2 encoded motors, activation button, internal tilt sensor and a light.
Interactive Motor is an encoded motor.
Color & Distance Sensor detects distance, motion and color, and can also function as a light.

Выглядит более "детским" чем xiaomi mitu biulder (робот и танк) и дороже китайца.
Интересно:
1) Когда выйдет. Итоговая цена. Предзаказ 160$ может быть не потолком.
2) Софт. Раньше фирменный софт Lego был платный. Ценники были негуманными на 300%.
Что сможет софт для android/ios, будет ли совместимость с др. софтом в т.ч. бесплатным от сообщества.
3) Электроника.
Совместимость текущими продуктами Лего ( они же регулярно меняют фирменный разъем, я не спец., но политика на 3---).
Возможность расширения.

4) В общем спасибо китайцам, ценник хоть немного ближе к реальности стал. Но у Лего или начнется канабализм своих же продуктов, или дебильные скрытые ограничения в этой линейке.

Народ, а как вы думаете можно как-нибудь установить и запустить приложение на телефоне, а не на планшете. Просто у нашего планшета bluetooth 3.0, а покупать новый только из-за Lego Boost не хочется.

Схожий вопрос - может кто-то подскажет есть ли вожможность установить програму на android 4.4.?

kr.artem,
Я нашел apk файл Ссылка, установилось все без проблем, но работает ли с конструктором проверить не могу.
У меня Elephone P9000 с Android 7.0

kr.artem,
И еще: на устройстве с Android 4.4 врятли будет bluetooth 4.1, а как мне заверили продавцы, работать с блютусом меньшей версии он не будет.

Интересно, есть ли возможность запустить на виртуальном эмуляторе с подключенным USB bluetooth 4.1 ?
Конструктор заказал ребетенку, чувствую, теперь еще и на новый планшет придется денег копить ((

У меня та же проблема.
Я установил Remix OS на ПК и плюс ORICO BTA - 403 Mini USB Adapter, всьо завелось.
Там много росказов о Bluetooth 4.1 или специальних BLE адаптерах, но многие новые адаптеры понимают BLE.


This page is created to collect and share the latest information about the LEGO® Powered Up platform.

Contents

Summary

The LEGO Powered Up system is the successor of the LEGO Power Functions system. It uses Bluetooth connection instead of infrared, it can use sensors and interactive motors besides the lights and standard motors. LEGO Boost offers a complete visual programming environment in the Boost app, some programming elements are also available in the Powered Up app. LEGO Control+ is the name for the app dedicated to the Technic sets using the new components. The new system uses a mobile/tablet application for control and there’s a 2 channel physical remote controller available as well. The connectors are not compatible with the Power Functions system therefore it is not possible to connect any of the Power Functions motors/lights/etc. It is possible however to control the IR receiver from the Powered Up app with the help of the Color & Distance sensor. The educational Spike Prime set also uses components that use the same Powered Up connector, although it has its own Scratch-based coding environment. The new 51515 Mindstorms Robot Inventor set also uses compatible hardware.

The future of Power Functions

Power Functions was discontinued at the end of 2020 with the following exceptions:

  • 8878 Power Functions Rechargeable battery box → Exited 31.12.2018
  • 45517 Transformer 10V DC → Exits 31.12.2021

Useful links

Powered Up vs. Control+

The app that controls the sets 42099 X-Treme Off-Roader, the 42100 Liebherr R9800 and the 42109 App-Controlled Top Gear Rally Car and other Technic sets is called Control+. This is the set-specific app for Technic, but it only has controls for the specific models and there are no customization options built in.

The hub and the motors in these sets also belong to the Powered Up family (sometimes called Power Functions 2 or PF2), so they share the same port and protocol like the Powered Up, Boost, Spike Prime or 51515 Mindstorms sets. The app that has and will have the ability to control all these elements is the Powered Up app. It has some set-specific control interfaces for the non-Technic sets (e.g. trains, App-controlled Batmobile etc.), but the main feature is the free play coding area where the components can be controlled with Boost-style program blocks. The 3.5.0 update of the Powered Up app brought us the first iteration of the customizable control interface.

Sets available with Powered Up components

Powered Up components available separately

    • similar to the 8870 Power Functions light, except for the new connector and a new style of splitter part in the middle without studs
    • can be fully controlled with the Boost app, it has 2 independent inner motors, 2 external ports for motors/sensors and a built-in tilt sensor
    • can be used to detect 6 different colors, light intensity and object distance, it can be also used to control the Power Functions IR receiver from the app
    • it has speed / power control and relative position reporting, that means it can report the current position compared to the relative zero which is by default the position where it was turned on
    • can be controlled with the Powered Up app, the size is identical to the 88000 Power Functions AAA battery box, also needs 6 AAA batteries to operate, it has 2 external ports for motors / sensors
    • it can connect to the 88009 hub, connects up to 5 different hubs giving access to different 10 channels
    • similar to the 88002 Power Functions train motor except for the new style connector, this motor has only power control
    • similar to the 8883 Power Functions Medium motor, except for the new style connector, it has 4 studs on the top-front part and only has 3 pin holes for connection on the front (the top one is missing), this motor has only power control
      • It has a new form factor, it has an absolute encoder meaning there’s a hardware zero position that the motor can use for various functions, e.g. for acting like a servo motor
      • It has a new form factor, it has an absolute encoder meaning there’s a hardware zero position that the motor can use for various functions, e.g. for acting like a servo motor
      • This hub appeared in 42099 & 42109, 42100 has two of them, it has 4 ports and it is powered by 6 AA batteries. It has a built-in gyroscope.
      • Available in the Spike Prime set, this motor has an absolute encoder
      • Available in the Spike Prime set (and will be available in the 51515 Mindstorms Robot inventor set in a different color), this motor has an absolute encoder
      • It measures pressures of up to 10 Newtons (~1kg), also works as a touch sensor with pressed/released/bumped detection
      • Sound wave sensor features 1-200cm range with +/- 1cm accuracy
      • It also has a built-in 6 pin connector for 3rd/DIY peripherals
      • Detects colors, measures intensity of reflected white light and ambient light
      • 6 input/output ports
      • 5×5 LED light matrix display
      • speaker
      • 6-axis gyroscope
      • rechargeable battery
      • microUSB port

      Official applications available

      App/hub/remote connection options

      With the current Boost application it is only possible to connect to a single hub. With the 3.0 release of the Powered Up app it is possible to connect to 4 different hubs simultaneously, they can be different types (Boost / Technic / City). With the remote it is possible connect to 5 different hubs so there are 10 channels to control. Each hub will be color coded, it is possible to switch between them with the press of the green button on the remote. It is also possible to assign multiple hubs to the same channel of the remote, so multiple hubs (outputs) can be controlled with the same button on the remote. Example and pairing process is demonstrated in this video.

      App/hub/remote compatibility list

      • Boost app with 88006 Boost hub
        • controls the 88008 Medium Linear Motor, 88007 Color & Distance Sensor
        • also controls the hub’s two internal motors, can use them as an input and can use the hub’s internal tilt sensor as an input
        • does not work with the 88005 LED Light, 88011 Train Motor, 45303 Simple Medium Linear Motor
        • it cannot connect to the 88009 Hub
        • Batmobile sub-app
          • controls the 88011 Train Motor, 45303 Simple Medium Linear Motor, 88008 Medium Linear Motor
          • does not work with the 88005 LED Light and 88007 Color & Distance Sensor
          • it connects to the 88006 Boost hub and controls the two internal motors (A & B outputs)
          • controls the 88011 Train Motor and 88005 LED Light (only one motor and one light, does not work with 2 motors / 2 lights)
          • does not work with the 45303 Simple Medium Linear Motor, 88008 Medium Linear Motor and 88007 Color & Distance Sensor
          • it connects to the 88006 Boost hub and controls one train motor and one light connected to the 2 external outputs (C & D)
          • controls the 88011 Train Motor, 45303 Simple Medium Linear Motor, 88008 Medium Linear Motor, 88005 LED Light, can use the 88007 Color & Distance Sensor
          • It can also connect to the Boost hub and control the internal motors and connected peripherals
          • it can connect to 4 different hubs simultaneously
          • it can use the WeDo 2.0 sensors (tilt and distance) connected to both hubs (Boost and PU)
          • It can use the 88010 Remote Control as an input device
          • It has a simple 2 slider + 3 button customizable interface and a joystick / turbo button + 3 button interface.
          • It connects to the 88009 Hub and can control the two outputs, can be used e.g. with the Batmobile and the trains but also other custom creations.
          • Different motors have different control options – for the train motor the up/down buttons increments through 10 speed settings, for the medium motors it offers a “bang-bang” style control, they only have zero or full power state.
          • Can connect to the Boost hub and control either the two internal motors or motors connected to the C & D ports
          • The Control+ app only offers an interface to control the Technic sets equipped with Powered Up hardware. There’s no possibility to customize it, the Powered Up app has this ability.

          3rd party applications compatible with Powered Up

          • BrickController 2
          • This application is designed to use a gamepad connected to the mobile device and control the following units: Power Functions infrared, Powered Up, BuWizz, SBrick. Video demonstration available here.
          • The app can fully control the current range of motors with the AAA and the AA hub as well, including proper servo support with calibration and custom zero position.
          • The BuWizz app can connect to the Technic (AA) hub. It offers classic motor speed control, does not have yet the ability to control the L and XL motors as a return to center servo.

          My Powered Up video playlist (tutorials & guides)

          My playlist with the Control+ sets (reviews and upgrades)

          Новая система Powered UP! — Ответы на вопросы AFOL-сообщества

          Модератор: Stenly

          Новая система Powered UP! — Ответы на вопросы AFOL-сообщества

          С запуском электрических элементов Powered UP! в новых поездах 60197 и 60198 в фан-сообществе появилось много вопросов, связанных с новой системой и ее местом относительно системы Power Functions. Мы публикуем ответы на широкий круг вопросов, заданных амбассадорами.

          Общие характеристики платформы/деталей

          Powered UP – это одно большое семейство электрических элементов с новыми коннекторами (включая Boost и WeDo 2.0) или же это брендовое название новых моторов для поездов и таких наборов, как новый Бэтмобиль на радиоуправлении?

          Powered UP – это новая строительная платформа с использованием электрических элементов. В ее основе – 2 основных типа связи: новый коннектор для подключения проводов и беспроводное управление через блютуз. Беспроводной обмен данными используется как между элементами Powered UP, так и между элементами и смарт-устройствами. На данный момент платформа Powered UP задействована в следующих продуктах: WeDo 2.0, Boost, поезда CITY, поезда DUPLO и Бэтмобиль.

          Учитывая, что элементы Powered UP появились в наборе, посвященном Бэтмену, можем ли мы рассчитывать на повсеместное использование новых блоков и моторов во множестве других серий LEGO (большее разнообразие серий, чем это было с Power Functions)?

          Система Powered UP была создана для того, чтобы заменить Power Functions. Проводное подключение предполагает намного более широкий набор функций и возможностей, а беспроводное соединение через блютуз лишено недостатков инфракрасных датчиков. В свою очередь, управление с помощью мобильных приложений дает огромный простор для игровых сценариев.

          Неужели не было возможности сделать батарейные блоки с больши количеством портов, чем только два? Для многих идей и проектов два выхода – чудовищное ограничение (особенно, если речь про модели Technic).

          Забегая вперед, мы можем заверить, что дальнейшее развитие платформы предполагает выпуск куда более широкого ассортимента элементов.

          Появится ли новая платформа в наборах Technic? И если да, то как будет решена проблема двух портов?

          Не вдаваясь в подробности будущих релизов, мы можем сейчас с уверенность сказать, что платформа Powered Up будет использоваться и в DUPLO, и в SYSTEM, и в Technic.

          Существует ли возможно скреплять между собой коннекторы (как это возможно с Power Functions)?

          Новые коннекторы не будут скрепляться друг с другом. Сама платформа предполагает, что на один выход/порт приходится только одна определенная функция, будь то мотор или сенсор.Например, любой элемент, подключенный к блоку, теперь может быть распознан автоматически. Если вы подключаете моторную тележку от поезда, то мобильное приложение само определит новое подключение как тележку. Это позволяет нам упростить игровой процесс для детей младшего возраста. Другое преимущество такого подхода – возможность оптимизации функциональности в зависимости от конкретного элемента. Например, моторная тележка или элементы освещения могут регулироваться плавно с помощью бегунков, тогда как М-мотор будет выдавать 100% мощности при нажатии на кнопку (это практично для д/у моделей)

          Нас интересуют технические характеристики системы: максимальный ток на выходе, минимальный и максимальный вольтаж?

          Подобные характеристики будут опубликованы до конца года.

          Какие вид элементов питания использую батарейный блок и пульт?

          Smart Hub 2 I/O (можно найти в поездах и Бэтмобиле) работает от 6 батареек типа ААА, а пульт управление – от 4 ААА.

          Могут ли использоваться аккумуляторные элементы питания?

          Нас интересует продолжительность игры от стандартных батареек по сравнению с системой PF. Потребляет ли новая платформа больше энергии?

          Потребление осталось примерно на том же уровне, что и при использовании PF.

          Будет ли когда-нибудь блок Smart Hub программируемым?

          Прошивка большинства хабов может быть обновлена до последней версии. Для сравнения, хабы WeDo 2.0 обновляться не могут.

          Где находится логический узел системы – в хабе, в смарт-девайсе или распределен между ними?

          Он распределен между хабом и смарт-девайсом. Смартфон может получать информацию и передавать команды обратно в хаб. Логические цепочки могут быть запрограммированы внутри смарт-девайса. ПО для программирования будет представлено в будущем.Разумеется, внутри самого хаба недостаточно вычислительной мощности для полноценного управления всеми функциями без использования смарт-девайса. Мы обеспечиваем базовую функциональность внутри самого хаба, например, возможность регулировать скорость моторов при использовании с моделями Boost.

          Насколько надежна новая платформа при одновременном использовании большого количества моторов?

          Система Powered UP была создана с расчетом на использование в большых школьных аудиториях. Так, например, WeDo 2.0 без проблем справляется с 45 независимыми подключениями в одном помещении.

          Будет ли предусмотрена возможность обновления по воздуху? Если да, можем ли мы расчитывать, что ПО однажды станет открытым на определенных условиях?

          Большинство хабов поддерживают обновления. И наша цель – сделать спецификации интерфейса доступными для открытого использования. Больше подробностей появятся до конца этого года.

          Подключение

          Сколько хабов я могу контролировать с одного пульта управления?

          Вы можете подключить до 5 устройств (хабов или смарт-контроллеров).

          Сколько хабов я могу контролировать с одного смартфона?

          В определенной степени это будет зависеть от девайса. На устройствах с iOS максимальное количество на данный момент – 10 хабов, но мы рассчитываем увеличить его со временем.

          Могу ли я синхронизировать хабы, используя пуль управления или смарт-приложение?

          Вы можете использовать несколько хабов на одном и том же канале и управлять ими синхронно.

          Как ведет себя моторная тележка от поезда в случае, если она оказывается за границей действия пульта управления?

          Если хаб или пульт управления оказываются слишком далеко друг от друга и связь рвется, оба устройства входят в режим поиска подключения (индикатор мигает белым цветом). В этом случае мотор прекращает работу. Как только хаб и пульт управления снова оказываются в радиусе действия друг друга, связь восстанавливается автоматически.

          Возможно ли выбрать сценарий поведения моторов в случае потери связи?

          Нет, мотор будет выключаться автоматически в любом случае. Могу ли я подключить мотор и световые элементы в хаб и включать и выключать их без использования пульта или приложения?

          Хаб — это лишь связующее звено между электрическим элементом и элементом управления.

          Может ли хаб быть использован исключительно как источник питания (с возможностью включения/выключения мотора без дополнительного пульта управления)?

          В данный момент хаб может только передавать и принимать сигналы и команды от пульта управления/мотора/датчика. Мы предполагаем добавление такой возможности в будущих прошивках.

          Какой способ управления действует в большем радиусе — смартфон или стандартный пульт управления?

          Радиус действия смартфона зависит от модели устройства. Тем не менее, оба способа управления должны иметь примерно одинаковый радиус действия.

          Ситуация: у меня есть два поезда и два пульта управления. Я использую их в парах для управления двумя разными поездами. На ночь я выключаю все элементы. Как я могу быть уверен, что, включив оба поезда на следующий день, связи между парами “хаб-пульт” останутся теми же, что и вчера?

          Когда хаб и пульт управления подключаются/сопрягаются первый раз, это соединение остается в памяти устройств даже после выключения (нажмите и удерживайте кнопку включения на хабе, что он вышел из сопряжения с пультом; нажмите и удерживайте кнопку включения на пульте управления, что удалить все сопряжения). Когда устройства будут включены обратно, связь между парами будет восстановлена автоматически. Если рассматривать ситуацию, описанную в вопросе, то достаточно включать связанные хаб и пульт управления одновременно.Примечание: для стирания памяти хаба достаточно выключить его, затем нажать и удерживать кнопку включения в течение 5 секунд. Индикатор начнет мигать фиолетовым цветом. Отпустите кнопку, готово!

          Совместимость

          Предусмотрена ли обратная совместимость новой системы и старых элементов PF?

          Разъемы обеих систем не совместимы друг с другом.

          Если совместимости нет, то почему нарушается принцип “все кубики ЛЕГО могут быть использованы друг с другом”?

          Цель новой платформы — расширить возможности игры, используя в том числе и смарт-девайсы.

          Будут ли элементы новой платформы совместимы с MINDSTORMS?

          Такая совместимость не предусмотрена. Примечание: возможность частичного подключения доступна при помощи ряда модификаций.

          Могу ли я апгрейдить старые наборы при помощи новых элементов?

          Ответ на этот вопрос зависит от множества факторов. Например, использование систему Powered UP в старых поездах не должно быть проблемой: размер всех элементов остался прежним.

          Управление

          Могу ли синхронизировать две моторные тележки, чтобы два локомотива тянули большое количество вагонов?

          Если подключить по мотору в каждый порт хаба, то для управления ими придется нажимать обе кнопки на пульте одновременно.Если установить два или больше хабов в один поезд и настроить их на один канал, то будет возможно управлять до 5 моторными тележками одновременно, при условии что все они подключены в соответствующие порты каждого хаба.

          Могу ли я управлять двумя моторами с одного пульта, если я хочу, чтобы полярность одного из моторов была изменена?

          “Полярность” мотора можно поменять, всего лишь развернув круглую панель с кнопками на самом пульте управления.

          Прочее

          При разработке новой системы проводились ли консультации с фан-сообществом? Если нет, то почему?

          При переходе от PF к Powered UP мы старались соблюсти баланс между потребностями всех, кто так или иначе взаимодействует с ЛЕГО, включая образовательные учреждения. В процессе работы над новой системой мы провели ряд мастер-классов и встреч с фанатами ЛЕГО поездов, чтобы убедиться, что новая система позволит поддержать их увлечение. Платформа позволяет избавиться от необходимости находиться в зоне прямой видимости приемника для управления поездом, а также работает на большем удалении, с большим количеством каналов. Мы и впредь планируем работать с фан-сообществом любителей поездов при разработке обновлений системы.

          Будет ли производство элементов PF остановлено полностью?

          Со временем система Powered UP полностью заменит старые PF-детали.

          Исчезнут ли элементы PF из продажи единовременно? Известна ли дата прекращения продаж?

          Несмотря на то, что наборы с PF постепенно уйдут из производства, сами элементы системы будут доступны для покупки в течение какого-то времени.

          Последний раз редактировалось Shurik Ср авг 08, 2018 8:18 am, всего редактировалось 1 раз.
          Причина: Changed by NCS

          This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

          Latest commit

          Git stats

          Files

          Failed to load latest commit information.

          README.md

          • Multiple Programming Models: SharpBrick.PoweredUp supports usage in a device model (hubs and devices as classes/properties; see examples below) or a protocol level (messages send up and down the Bluetooth Low Energy Protocol).
          • Typed Devices with explicit Functions: The SDK supports most commands described in the Lego Wireless Protocol in its typed devices (Motors, Lights, ..). They are self-describing to support a quick bootup of the SDK.
          • Dynamic Devices: The SDK can auto-discover new devices which are not yet known by the SDK. The device can be directly accessed either by writing data directly to a mode or receiving notification about value changes.
          • Awaitable Commands: Instead of waiting a defined amount of time for the devices to react, directly listens to the feedback messages the LEGO Wireless Protocol provides. No unecessary delays and race conditions.
          • Port Value Combined Mode: If supported by the device, the SDK allows you to configure the devices to combine multiple feedbacks of the same device within the same message (e.g. speed and absolute position of a motor).
          • Virtual Port Creation: Combine multiple devices of the same type into a virtual combined port. This allows synchronous access to multiple devices using the same message (e.g. using two motors for driving).
          • Deployment Model Verification: The SDK includes a model builder and a verification method to ensure that the wired devies are correctly reflecting the expectations in the program.
          • Tools: The poweredup CLI includes a device list feature, enumerating the metadata properties of the LEGO Wireless Protocol.
          • Support for multiple Bluetooth Stacks: Use either Microsoft WinRT, BlueGiga Bluetooth (Silicon's Lab BlueGiga-adapter, for example BLED112) or Xamarin using BLE.Plugin to talk to your Lego hubs.

          Additional to code fragments below, look into the examples/SharpBrick.PoweredUp.Examples project (15+ examples).

          Discovering Hubs for UI

          Sending Commands to Ports and Devices of a Hub

          See source code in examples/SharpBrick.PoweredUp.Examples for more examples.

          Receiving values from Ports and Devices of a Hub (single value setup)

          Connecting to an unknown device

          Connect to Hub and Send a Message and retrieving answers (directly on protocol layer)

          Note: The ILegoWirelessProtocol class was renamed in 3.0. Previously it is known as IPoweredUpProtocol .

          Connecting with other Bluetooth Adapters

          • BlueGiga Adapter: Find more details in the docs about the needed configuration and the setup on Windows, Ubuntu or the Raspberry Pi.

          Command Line Experience

          Note: Due to upstream issues in the dotnet/sdk (issue) we are currently not providing the NuGet distributed dotnet tool . The CLI itself can be used by dotnet run -- when compiling this project directly.

          The poweredup command line utility intends to allow the inspection of LEGO Wireless Protocol / Powered UP hubs and devices for their properties. It has utilities for .

          Enumerating all connected Devices including hub internal devices and emit their static self-description as they expose using the LEGO Wireless Protocol.

          Binary dumping the self-description helps protocol implementors with a lack of devices to understand and try to implement the devices without having the physical device. Also the output is needed when programming the library to enable a fast bootup of the SDK.

          Pretty Print Binary Dumps: Help to convert a binary dump in a nice representation.

          Use of other Bluetooth LE stack By default the CLI tools assumes the usage of WinRT. If used on another operating system or with another Bluetooth Adapter on Windows, the Bluetooth Adapter needs to be specified. Adapter might need additional configuration, see their details documentation.

          SDK Status, Hardware Support, Contributions, ..

          Basic Architecture within the SDK

          DI Container Elements

          SDKs in other programming languages

          • JavaScript (Node + Browser):
          • sharpbrick/powered-up (this here) (and blog) (Lego Train Project . Contains logic for the LWP)
            (Arduino)

          SharpBrick is an organization intended to host volunteers willing to contribute to the SharpBrick.PoweredUp and related projects. Everyone is welcome (private and commercial entities). Please read our Code of Conduct before participating in our project.

          The product is licensed under MIT License to allow a easy and wide adoption into prviate and commercial products.

          Thanks to @nathankellenicki, @dlech, @corneliusmunz, @KeyDecoder, @highstreeto, @Berdsen , @vuurbeving and @dkurok for their code, answers, testing and other important contributions.

          This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

          Latest commit

          Git stats

          Files

          Failed to load latest commit information.

          README.md

          node-poweredup - A Javascript module to interface with LEGO Powered Up components.

          • v7.1.0 adds support for SPIKE Essential, including the Technic Small Hub, Technic Small Angular Motor, and Technic 3x3 Color Matrix.

          LEGO Powered Up is the successor to Power Functions, the system for adding electronics to LEGO models. Powered Up is a collection of ranges, all of which are compatible with each other:

          • LEGO Education WeDo 2.0
          • LEGO Boost
          • 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.

          This library allows communication and control of Powered Up devices and peripherals via Javascript, both from Node.js and from the browser using Web Bluetooth.

          More examples are available in the "examples" directory.

          Node.js v12.0+ required.

          node-poweredup uses the Noble BLE library by Sandeep Mistry. On macOS everything should function out of the box. On Linux and Windows there are certain dependencies which may need installed first.

          Note: node-poweredup has been tested on macOS 11.0 and Debian/Raspbian on the Raspberry Pi 3 Model B.

          While most Powered Up components and Hubs are compatible with each other, there are exceptions. For example, there is limited backwards compatibility between newer components and the WeDo 2.0 Smart Hub. However WeDo 2.0 components are fully forwards compatible with newer Hubs.

          Device Name Product Code Type WeDo 2.0 Smart Hub Boost Move Hub Powered Up Hub Control+ Hub Availability
          WeDo 2.0 Tilt Sensor 45305 Sensor Yes Yes Yes Yes 45300
          WeDo 2.0 Motion Sensor 45304 Sensor Yes Yes Yes Yes 45300
          WeDo 2.0 Medium Motor 45303 Motor Yes Yes Yes Yes 45300
          76112
          Boost Color and Distance Sensor 88007 Sensor Partial Yes Yes Yes 17101
          Boost Tacho Motor 88008 Motor/Sensor Partial Yes Yes Yes 17101
          Powered Up Train Motor 88011 Motor Yes Yes Yes Yes 60197
          60198
          Powered Up LED Lights 88005 Light Yes Yes Yes Yes 88005
          Control+ Large Motor 22169 Motor/Sensor Partial No Yes Yes 42099
          42100
          Control+ XLarge Motor 22172 Motor/Sensor Partial No Yes Yes 42099
          42100
          SPIKE Prime Medium Motor 45678 Motor/Sensor Partial No Yes Yes 45678
          SPIKE Prime Large Motor 45678 Motor/Sensor Partial No Yes Yes 45678
          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.

          Hub Name Product Code Built-In Features Availability
          WeDo 2.0 Smart hub 45301 RGB LED
          Piezo Buzzer
          Button
          45300
          Boost Move Hub 88006 RGB LED
          Tilt Sensor
          2x Tacho Motors
          Button
          17101
          Powered Up Hub 88009 RGB LED
          Button
          60197
          60198
          76112
          Powered Up Remote 88010 RGB LED
          Left and Right Control Buttons
          Button
          60197
          60198
          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
          45345

          Known Issues and Limitations

          The WeDo 2.0 Smart Hub uses an older firmware which is no longer being updated. As a result, only certain motors and sensors work with it. See the table above.

          When used with the Boost Move Hub, the Control+ Motors and SPIKE Prime Motors/Sensors do not currently accept commands (This is a known bug which requires a firmware update from Lego to fix)

          The SPIKE Prime Hub does not use Bluetooth Low Energy, so is not supported via this library. It is recommended you use MicroPython to develop for this Hub using the officially provided tools and software. The SPIKE Essential Hub however is supported, as it uses Bluetooth Low Energy.

          On most Unix systems, you need root permissions to access Bluetooth devices. You may want to grant the node executable access to the Bluetooth adapter

          Thanks go to Jorge Pereira (@JorgePe), Sebastian Raff (@hobbyquaker), Valentin Heun (@vheun), Johan Korten (@jakorten), and Andrey Pokhilko (@undera) for their various works, contributions, and assistance on figuring out the LEGO Boost, WeDo 2.0, and Powered Up protocols.

          Читайте также: