Input/Output Commands

#off Turn All of a Port's Pins Off

#off

Turn all of port #’s pins off.


Purpose

This will turn all of the pins on the specified port off.


Syntax

#off


Arguments

#

The port letter a, c, d, e


Examples

aoff Turn all port A pins off coff Turn all port C pin off


Notes

See the #on command to turn port pins on



#on Turn All of a Port's Pins On

#on

Turn all of port #’s pins on.


Purpose

This will turn all of the pins on the specified port on.


Syntax

#on


Arguments

#

The port letter a, c, d, e


Examples

aon Turn all port A pins on con Turn all port C pin on


Notes

See the #off command to turn port pins off.



#~ Turn Pin On or Off

#~ Turn pin on or off

Purpose

Allows you to turn a given port A, C, D, E pin on or off.

Syntax #~ state


Arguments # The port letter a, b, c, d

~ The port pin number 1 to 5

state The desired state of the pin. 0=OFF 1=ON

Pushers No

Returns Nothing Examples

a1 1

Turn port A pin 1 on


a1 0

Turn port A pin 1 off Notes

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


get #~ Turns the Pin Into an Input and Gets a Reading From It

get #~ Turns the pin into an input and gets a reading from it

Purpose

Set the pin as an input and get a fresh reading from it in real time.

Syntax get #~

Arguments # The port letter a, b, c, d

~ The port pin number 1 to 5

Notes Takes a direct reading from the hardware pin.



glr Get a Fresh Set of Readings and Display Them

glr

Get a fresh set of readings and display them

Purpose This will get fresh readings from any sensors etc and display them.


Syntax glr



gqr Get Quick Readings in One Line Form

gqr

Get quick readings in one line form


Purpose

Gets a set of readings and puts them on one line


Syntax

gqr


Examples

> gqr < a1000a2000a3000a4000a5000 b1 000 b2 000 b3 000 b4 000 b5 000 c1 000 c2 000 c3 000 c4 000 c5 000 d1 000 d2 000 d3 000 d4 000 d5 000 e1 000e2000e3000e4000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000



grd Get Raw Readings from the Channels in One Line Form

grd

Get raw readings from the channels in one line form


Purpose

Gets a fresh set of raw readings and displays them on one line


Syntax

grd


Examples

> grd < 1 0 0.00|2 0 0.00|3 0 0.00|4 0 0.00|5 0 0.00|6 0 0.00|7 0 0.00|8 0 0.00|9 0 0.00| 10 0 0.00|11 0 0.00|12 0 0.00|13 0 0.00| 14 0 0.00|15 0 0.00|16 0 0.00|17 0 0.00| 18 0 0.00|19 0 0.00|20 0 0.00|21 0 0.00| 22 0 0.00|23 0 0.00|24 0 0.00|25 0 0.00| 26 0 0.00|27 0 0.00|28 0 0.00|29 0 0.00| 30 0 0.00|31 0 0.00|32 0 0.00|33 0 0.00| 34 0 0.00|35 0 0.00|36 0 0.00|37 0 0.00| 38 0 0.00|39 0 0.00|40 0 0.00|


Notes

The format of the output is: |chan raw raw_float|



grrd Get Real Raw Readings from the Channels in One Line Form

grrd

Get real raw readings from the channels in one line form

Purpose Gets a fresh set of raw readings and displays them on one line

Syntax grrd

Examples > grrd < a10a20a30a40a50b10b20b3 0 b4 0 b5 0 c1 0 c2 0 c3 0 c4 0 c5 0 d1 0 d2 0 d3 1 d4 0 d5 0 e1 0 e2 0 e3 0 e4 0

Notes

The format of the output is: pin value



gt Get the Values of the Specified Port

gt Get the values of the specified port. Purpose Returns a table of the current values of the port #. If the # port is left out it return the values of all ports. Syntax gt#


or


gt

Arguments # The port letter a, b, c, d, e

Examples gt a

Get the port A values

gt 6 Get the value of channel 6 Notes The type column shows the current type of the pin.



pulse Pulse Output

pulse Pulse Output

Purpose Pulses the selected output on for the specified length of time

Syntax pulse #~ time

Arguments # The port letter a, b, c, d

~ The port pin number 1 to 5

time (milli secs) The amount of time for which the pin will remain high.

Pushers No Examples pulse a1 100 Pulse a1 on for 100ms



puon Set the Pin as an Input with the Pull-Up Resistor Enabled

puon

Set the pin as an input with the pull-up resistor enabled


Purpose

Makes the pin an input with an internal pull-up resistor enabled


Syntax

puon #~


Arguments

#

The port letter a, b, c, d


~

The port pin number 1 to 5


Examples

puon c5

puon a4



spex Set Port Expander

spex

Set Port Expander


Purpose

This will setup the specified MCP23017 i/o expander on a virtual port with a port letter from h to l


Syntax

spex addr port


Arguments

addr

The i2c address on which the expander is located


port

The letter of the virtual port to which the i/o expander is to be associated with: h, i, j, k or l


Pushers No


Examples

spec 12 h Link the i/o expander on i2c address 12 to virtual port h


Notes

Once linked the i/o expander port pins may be used in the same manner as normal pins. ie using the #~ notation.

The difference is that each i/o expander port has 8 pins instead of 5.


spm Set a Pin's Mode of Operation

spm

Set a pins mode of operation


Purpose

Set the mode of operation of a pin


Syntax

spm #~ mode


Arguments

#

The port letter a, b, c, d


~

The port pin number 1 to 5


mode

The mode of operation for the pin


Mode Description

0 Logic input no pull-up resistor 1 Logic input with pull-up resistor on 2 Logic output 3 Analog input port b only


Notes

spm a1 1 Set pin a1 as a logic input with a pull- up resistor


spm a4 2 Set pin a4 as a logic output



tg #~ Toggle the Value of the Selected Pin

tg #~ Toggle the value of the selected pin

Purpose Toggles the value of the selected pin. If it’s on it will go off and vice versa

Syntax tg #~

Arguments # The port letter a, b, c, d

~ The port pin number 1 to 5


Pushers Yes Returns Nothing

Examples tg a1

Toggle value of a1

tg d1 Toggle the value of the USER LED

tg d1 -> /user_led_state