Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 1.18 KB

README.md

File metadata and controls

28 lines (18 loc) · 1.18 KB

PlanetX Package

This extension is designed to programme and drive the sensor series PlanetX(行星X) micro:bit expansion sensor, You can get PlanetX from the Elecfreaks store

Code Example

basic.forever(function () {
    PlanetX.showUserText(1, "Temp:" + PlanetX.octopus_BME280(PlanetX.BME280_state.BME280_temperature_C))
    PlanetX.showUserText(2, "Distance:" + PlanetX.Ultrasoundsensor(PlanetX.DigitalRJPin.J1, PlanetX.Distance_Unit_List.Distance_Unit_cm))
    if (PlanetX.buttonAB(PlanetX.DigitalRJPin.J1, PlanetX.ButtonStateList.A)) {
        PlanetX.motorfan(PlanetX.AnalogRJPin.J1, true, 80)
    }
})

Supported targets

  • for PXT/microbit

License

MIT