How to add extension PlanetX and Nezha from Elecfreaks (https://github.com/elecfreaks/pxt-PlanetX/) and update Nezha (https://github.com/elecfreaks/pxt-nezha)

Issue #411 resolved
Alejandro Alexis Del Mar Raga created an issue

No description provided.

Comments (7)

  1. John Maloney repo owner

    Thank you for this.suggestion.

    As you know, MicroBlocks does not yet have a library for the Nezha and PlanetX system. You can probably use existing MicroBlocks libraries to work with a number of the Planet X sensors by using the appropriate pin numbers (see https://www.elecfreaks.com/learn-en/microbitExtensionModule/nezha.html for pin numbers).

    If anyone reading this wants to write a Nezha library, let us know, it is probably not difficult. The library can be written entirely in MicroBlocks and you can use the Makecode libraries as a reference.

  2. Alejandro Alexis Del Mar Raga reporter

    Muchas gracias. Iniciaré creando pruebas desde el mismo MicroBlocks.

  3. John Maloney repo owner

    Are you offering to help with this? That would be great!

    I could get things started by creating a MicroBlocks Nezha library that includes motor control blocks (using code from the pxt-nezha repository). There are many different Planet-X sensors and output devices. The code for those is in the pxt-PlanetX respository in the files basic.ts, display.ts, and wifi.ts. If the existing NeoPixel library works with the Planet-X RGB strip, then we won't need the assembly language code in displaySendBuffer.asm.

    Some of the Planet-X devices are already supported by MicroBlocks, but many others are not. However, they don't all need to be added at once; one could start with a commonly-used subset and add more later.

  4. John Maloney repo owner

    Check out the "Nezha" an "Nezha2" libraries in the "ELECFREAKS" folder in the pilot release.

    The Nezha library, written by Wenjie Wu, offers motor and servo control. The newer Nezha2 library offers motor and servo control plus support for a number of Planet-X components (the set of components that comes with the Inventors Kit).

    Hope that helps!

  5. Log in to comment