microsoft / pxt-adafruit

Microsoft MakeCode editor for Adafruit Circuit Playground Express
https://makecode.adafruit.com
Other
81 stars 77 forks source link

No mbed build #951

Closed pelikhan closed 5 years ago

pelikhan commented 5 years ago

This build uses the mbed-less codal build, based on ASF.

Todo (future PR):

Test program:

input.buttonB.onEvent(ButtonEvent.Click, function () {
    music.playSound(music.sounds(Sounds.PowerDown))
    light.stopAllAnimations()
    light.showAnimation(light.theaterChaseAnimation, 500)
})
input.buttonA.onEvent(ButtonEvent.Click, function () {
    network.infraredSendNumber(0)
    music.playSound(music.sounds(Sounds.PowerUp))
    light.stopAllAnimations()
    light.showAnimation(light.colorWipeAnimation, 500)
})
network.onInfraredReceivedNumber(function (num) {
    music.playSoundUntilDone(music.sounds(Sounds.Siren))
})
input.pinA2.onEvent(ButtonEvent.Click, function () {
    music.playSound(music.sounds(Sounds.JumpUp))
    light.stopAllAnimations()
    light.showAnimation(light.sparkleAnimation, 500)
})
input.onGesture(Gesture.Shake, function () {
    music.playSound(music.sounds(Sounds.BaDing))
    light.stopAllAnimations()
    light.showAnimation(light.runningLightsAnimation, 500)
})
input.onLoudSound(function () {
    music.playTone(262, music.beat(BeatFraction.Half))
    light.stopAllAnimations()
    light.showAnimation(light.cometAnimation, 500)
})
forever(function () {
    light.showAnimation(light.rainbowAnimation, 500)
})