User Tools

Site Tools

한국어

cubloc:keyin:index

KeyIn

variable = KeyIn( ort, debouncingTime)

variable Variable to store results (No String or Single)
port Input port (0 to 255)
deboucingTime Debouncing time (1 to 65535)

The command KeyIn removes the input signal's contact bounce before reading an input. You can use KeyIn only with active low inputs as shown below. For active high inputs, please use KeyInH. When a button press is detected, KeyIn will return 0; otherwise, it will return 1.

If you use 10 for the deboucing time, the Cubloc will debounce for 10 ms. Contact bounce usually stops after 10ms, so a 10ms debouncing time will suffice for most applications

A = KeyIn(1,10) 'Read from port 1 after waiting 10ms for debouncing.

Go CUBLOC home

cubloc/keyin/index.txt · Last modified: 2016/04/14 11:07 (external edit)