Using a micro:bit v1, and using only the midi-bluetooth extension I got the following error:
Cannot read properties of undefined (reading 'toString').
The program is simple:
bluetooth.onBluetoothConnected(function () {
basic.showIcon(IconNames.Happy)
})
bluetooth.onBluetoothDisconnected(function () {
basic.showIcon(IconNames.Sad)
})
let knobValue = 0
let readValue = 0
basic.showIcon(IconNames.Fabulous)
basic.forever(function () {
readValue = Math.round(pins.analogReadPin(AnalogPin.P1) / 8.06)
if (readValue != knobValue) {
knobValue = readValue
midi.channel(1).controlChange(33, knobValue)
led.plotBarGraph(knobValue, 127)
}
})

Using a micro:bit v1, and using only the midi-bluetooth extension I got the following error:
Cannot read properties of undefined (reading 'toString').
The program is simple:
bluetooth.onBluetoothConnected(function () {
basic.showIcon(IconNames.Happy)
})
bluetooth.onBluetoothDisconnected(function () {
basic.showIcon(IconNames.Sad)
})
let knobValue = 0
let readValue = 0
basic.showIcon(IconNames.Fabulous)
basic.forever(function () {
readValue = Math.round(pins.analogReadPin(AnalogPin.P1) / 8.06)
if (readValue != knobValue) {
knobValue = readValue
midi.channel(1).controlChange(33, knobValue)
led.plotBarGraph(knobValue, 127)
}
})