CPE doesn't do what the simulator does

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
vsamn
 
Posts: 1
Joined: Wed Aug 03, 2022 9:53 am

CPE doesn't do what the simulator does

Post by vsamn »

This code (created by the blocks, to change the lights and play a sound when I press A2) works in the emulator but when I download/put it in the CPLAYBOOT drive, my circuit doesn't do anything at all.

Code: Select all


input.touchA2.onEvent(ButtonEvent.Click, function () {
    light.setAll(0xff0000)
})
input.touchA2.onEvent(ButtonEvent.Up, function () {
    music.powerUp.playUntilDone()
    light.showRing(
    `green black green black green green black green black green`
    )
})
input.pinA2.setThreshold(200)
forever(function () {
    if (input.touchA2.isPressed()) {
        light.showRing(
        "red red red red red red red red red red"
        )
    }
})


Locked
Please be positive and constructive with your questions and comments.

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”