STINKJET


MENU
Home
Physical Structure
Microcontroller Hardware
Microcontroller Software
RS-232 Command Set
Source Code

STINKJET: The Valve-Controlled Smell Generator

RS-232 Command Set

The user can control the valves and conditions as well as monitor the sensors via a command line interface. The command line is accessed through a serial port terminal. Be sure to set the serial port to 9600 baud, no parity, no flow control. Below is a summary of each command and its usage. Note that the commands are case sensitive.

System monitoring


status
Action:

Displays a list indicating the status of each valve (open or closed) and each sensor (broken or unbroken). Note that the first four characters returned are bit-mapped versions of the valve and sensor status. These bytes have been included in case a graphical interface is created at some point. The remainder of the output is a nicely formated list.

Parameters: none
Example: status


Basic valve manipulation


open
Action:

Opens a valve

Parameters: valve number
Example: open 15


close
Action:

Closes a valve

Parameters: valve number
Example: close 15


closeall
Action:

Closes all valves

Parameters: none
Example: closeall


openall
Action:

Opens all valves (for whatever reason)

Parameters: none
Example: openall


Condition instructions


openonbroken
Action:

Sets the specified valve to open when the indicated sensor is broken (Condition can be eliminated via the remove command.)

Parameters: valve number sensor number
Example: openonbroken 15 1 (Valve 15 will open when sensor 1 is broken)


openonunbroken
Action:

Sets the specified valve to open when the indicated sensor is unbroken (Condition can be eliminated via the remove command.)

Parameters: valve number sensor number
Example: openonunbroken 15 1 (Valve 15 will open when sensor 1 is unbroken)


closeonbroken
Action:

Sets the specified valve to close when the indicated sensor is broken (Condition can be eliminated via the remove command.)

Parameters: valve number sensor number
Example: closeonbroken 15 1 (Valve 15 will close when sensor 1 is broken)


closeonunbroken
Action:

Sets the specified valve to close when the indicated sensor is unbroken (Condition can be eliminated via the remove command.)

Parameters: valve number sensor number
Example: closeonunbroken 15 1 (Valve 15 will close when sensor 1 is unbroken)


togglewithsensor
Action:

Sets the specified valve to toggle when the indicated sensor status changes (Condition can be eliminated via the remove command.)

Parameters: valve number sensor number
Example: togglewithsensor 15 1 (Valve 15 will toggle when sensor 1 changes)


remove
Action:

Removes the condition on the indicated valve

Parameters: valve number
Example: remove 15 (removes the condition on valve 15)