Approved content

The content below is provided by a partner.

elecfreaks/pxt-nezha 1.3.9 GitHub

NeZha Package

This extension is designed to programme and drive the NeZha micro:bit expansion board, You can get NeZha from the Elecfreaks store

Code Example


input.onButtonPressed(Button.A, function () {
    neZha.setMotorSpeed(neZha.MotorList.M1, 100)
    neZha.setMotorSpeed(neZha.MotorList.M2, 100)
    neZha.setMotorSpeed(neZha.MotorList.M3, 100)
    neZha.setMotorSpeed(neZha.MotorList.M4, 100)
})
input.onButtonPressed(Button.B, function () {
    neZha.setServoAngel(neZha.ServoList.S1, 119)
    neZha.setServoSpeed(neZha.ServoList.S2, -58)
})
input.onButtonPressed(Button.AB, function () {
    neZha.stopAllMotor()
})
basic.forever(function () {

})

Supported targets

License

MIT

nezha=github:elecfreaks/pxt-nezha#v1.3.9