HIGH   INPUT   LED   LOW   OUTPUT

Basic ESP32 Constants

HIGH ( -- 1 )

Constant. Defines the acive state of a pin.

Example:

: ledon ( -- )
    HIGH LED pin 
    ; 

INPUT ( -- 1 )

Constant. Value 1. Defines the direction of use of a GPIO register as an input.

LED ( -- 2 )

Pin 2 value for LED on the board. Does not work with all cards.

LOW ( -- 0 )

Example:

: ledoff ( -- )
    LOW LED pin 
    ;  

OUTPUT ( -- 2 )

Constant. Value 2. Defines the direction of use of a GPIO register as an output.

Example:

: ledsetup ( -- )
    LED OUTPUT pinMode 
    ;