Input A feedback address
A feedback address on your command station or feedback module: of a detector, or of a push button or switch on the layout. You make it with input(number).
用途: For push buttons and switches on the layout that are not a block: a button that sets a route, a switch for night mode.
input(12).onOn {
route(blocks.B1, blocks.B4).set()
}プロパティ
on → boolean
Whether it is on now.
Whether the address is on now. Asked live.
if (input(20).on) {
flag("night").on()
}イベント
onOn → Input
When it goes on.
Fires when the address goes on (the button is pressed, the detector occupied).
input(12).onOn {
log "on"
}