Component: Switch (EB007) (E-blocks 1)

From Flowcode Help
Revision as of 14:51, 22 May 2018 by BenR (talk | contribs) (XML import - Pre 8.0 release)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Author Matrix TSL
Version 2.0 (Release)
Category E-blocks 1


Image Switch (EB007) component

An array of up to eight momentary push switches, each connected to a single pin of the specified port.

Examples

No additional examples


Downloadable macro reference

ReadState

Read the state of the switch at the given index.

Parameters

BYTE Index
The switch to read the status of.


Return value

BOOL : Key state - true = on, false = off


WaitUntilHigh

Pause the program until the switch at the given index is turned on.

Parameters

BYTE Index
Index of the switch to wait for.


Return value

This call does not return a value


ReadAll

Reads all of the switches at once, returning a byte containing one bit per

switch.

Parameters

This macro has no parameters


Return value

BYTE : One bit per switch in the array.


WaitUntilLow

Pause the program until the switch at the given index is turned on.

Parameters

BYTE Index
Index of the switch to wait for.


Return value

This call does not return a value


Simulation macro reference

This component does not contain any simulation macros


Property reference

Input Mode

This property is of type Fixed list of ints and can be referenced with the variable name port.

Choose how your switches are connected.

PORT = Single port byte for all switches - pins are allocated in sequence from pin 0 - X

Custom = Individual pin by pin connections

Port

This property is of type Digital port byte and can be referenced with the variable name PortByte.

No additional information