pxt-calliope/docs/reference/control/event-source-id.md

11 lines
363 B
Markdown
Raw Normal View History

2016-07-21 22:29:59 +02:00
# Event Source ID
2016-07-20 20:31:14 +02:00
2016-07-21 22:29:59 +02:00
Return a code representing the origin of the event on the bus (button, pin, radio, and so on).
2016-07-20 20:31:14 +02:00
```sig
2016-07-21 22:29:59 +02:00
control.eventSourceId(EventBusSource.MICROBIT_ID_BUTTON_A);
2016-07-20 20:31:14 +02:00
```
2016-07-21 22:29:59 +02:00
**This is an advanced API.** For more information, see the
[micro:bit runtime messageBus documentation](https://lancaster-university.github.io/microbit-docs/ubit/messageBus/)