# Pin events

**URL:** <https://forum.makecode.com/t/pin-events/1122>\
**Category:** Adafruit Circuit Playground Express\
**Created:** [January 27, 2020, 4:54pm UTC](https://forum.makecode.com/t/pin-events/1122 "2020-01-27T16:54:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jedgarpark](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jedgarpark/32/202_2.png) [@jedgarpark](https://forum.makecode.com/u/jedgarpark)\
**Post date:** [January 27, 2020, 4:54pm UTC](https://forum.makecode.com/t/pin-events/1122/1 "2020-01-27T16:54:28Z")

</div>

Ssomeone asked this on Adafruit forums:

I have been unable to get `PINS`-\>“onEvent” to work. This not the “onEvent” front he “INPUT”. But I have not been able to get any event: fall, rise, pulse high or pulse low. I can poll the pin just fine in the forever loop.

Here is a minimal code I was testing with:

Code: [Select all](https://forums.adafruit.com/viewtopic.php?f=64&t=161297#) | [TOGGLE FULL SIZE](https://forums.adafruit.com/viewtopic.php?f=64&t=161297#)

`pins.A7.onEvent(PinEvent.Fall, function () { light.setAll(0xff8000)})pins.A7.setPull(PinPullMode.PullUp)forever(function () { })`

For this case I was connecting GND to A7 with a wire and there was no effect.

This is with the Circuit Playground express.

Thanks for the help.

[https://forums.adafruit.com/viewtopic.php?f=64&t=161297](https://forums.adafruit.com/viewtopic.php?f=64&t=161297)

I can get this to work in the simulator, but not on hardware. Any ideas?
