top of page

Button Commands

bp - Simulate a button press

Purpose Simulates a button press on a given pin. This is used for the GCC version of Octagon or where a physical button is not available.

Syntax bp #~ Arguments #~ The port letter a, b, c, d and pin number 1 to 5. eg a1 or c4

Examples bp a1 bp c4

Notes This can be used from the command line and in programs.

Channels & Vars Updates the corresponding channel.


br - Simulate a button release

Purpose

Simulates a button release on a given pin. This is used for the GCC version of Octagon or where a physical button is not available.


Syntax

br #~

Arguments

#~

The port letter a, b, c, d and pin number 1 to 5. eg a1 or c4


Examples br a1 br c4

Notes This can be used from the command line and in programs. Channels & Vars Updates the corresponding channel.


btd - Set the button debounce delay in milli seconds

Purpose

Sets the debounce delay for buttons.


Syntax

btd delay


Arguments

delay

The debounce delay in milli seconds. 50 to 250.


Examples

btd 50


Notes

Use with pins set as buttons.


btg - Get the state of a button

Purpose

Gets the state of the specified button


Syntax

btg #~


Arguments

#~

The port letter a, b, c, d and pin number 1 to 5. eg a1 or c4


Examples

> btg a1 < Btg button chan[1] pin [a1] State [1] 1 = pressed


btp - Set a button press event

Purpose Set a command/s that should be run when the specified button is pressed.

Syntax btp #~ command/s

Arguments #~

The port letter a, b, c, d and port pin number 1 to 5 command/s One or more commands that should be run when the button is pressed. Commands may be daisy chained.

Examples btp a1 “Hi from button 1” btp a2 d1 1|d500|d1 0

Notes This can be used from the command line and in programs.

Drive Page Buttons: The drive page buttons 1 to 9 are virtual buttons and are on port v ie v1 to v9. eg btp v1 “Hi from drive button 1”


btr - Set a button release event

Purpose

Set a command/s that should be run when the specified button is released.

Syntax btr #~ command/s

Arguments #~ The port letter a, b, c, d and port pin number 1 to 5 command/s One or more commands that should be run when the button is released. Commands may be daisy chained.

Examples btr a1 “Bye from button 1” btr a2 d1 1|d500|d1 0

Notes This can be used from the command line and in programs.

Drive Page Buttons: The drive page buttons 1 to 9 are virtual buttons and are on port v ie v1 to v9. eg btr v1 “Bye from drive button 1”


lb - List buttons

Purpose

Display a list of the currently active buttons.


Syntax

lb


lbc - List button commands

Purpose

Display a list of the commands required to reproduce the currently set buttons. Use this to backup button settings.


Examples

> lbc < Button Commands btp a1 "Button press a1" btr a1 "Button release a1"


rstb - Reset all buttons

Purpose

reset all of the set buttons.

bottom of page