<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://oiswiki.sysadninjas.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stibbons</id>
		<title>Wiki in Space - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://oiswiki.sysadninjas.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stibbons"/>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/wiki/Special:Contributions/Stibbons"/>
		<updated>2026-04-21T22:47:19Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Hello_World&amp;diff=1437</id>
		<title>Arduinos in Space Hello World</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Hello_World&amp;diff=1437"/>
				<updated>2019-03-07T13:13:45Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First, ensure Objects in Space is configured to talk to hardware, following the directions in [[Getting started with hardware]].&lt;br /&gt;
&lt;br /&gt;
Open the Arduino IDE, create a new sketch (File -&amp;gt; New), and enter the following code:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#include &amp;quot;ArduinosInSpace.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  OIS.begin();&lt;br /&gt;
&lt;br /&gt;
  OIS.registerBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
  OIS.activate();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  OIS.update();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save this (call it something like &amp;quot;HelloWorld&amp;quot;, then build and upload to your board. With the board still connected, ensure the Arduino serial monitor is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; running, and launch Objects in Space. All going well, the game will open a connection to your board, and the built-in LED on your board will turn on to indicate when EMCON mode is active.&lt;br /&gt;
&lt;br /&gt;
== Understanding Arduinos in Space ==&lt;br /&gt;
&lt;br /&gt;
=== Objects in Space connections ===&lt;br /&gt;
&lt;br /&gt;
Before getting in to how Arduinos in Space, let&amp;#039;s talk about how the game communicates with devices. A connection between Objects in Space (the server) and an Arduino (the client) has three separate phases:&lt;br /&gt;
&lt;br /&gt;
* Handshaking: the server is listening for an initial request from the client.&lt;br /&gt;
* Syncing: the client sends commands to the server defining expected inputs and outputs.&lt;br /&gt;
* Active: the server is able to send game data to the client, and the client is able to send commands to the server.&lt;br /&gt;
&lt;br /&gt;
=== Arduinos in Space overview ===&lt;br /&gt;
&lt;br /&gt;
Using Arduinos in Space is fairly straightforward.  In the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; method of your sketch you start by setting up a serial connection with the game, and creating an Arduinos in Space object that will manage the connection. Then you use methods on that object to progress through the different connection phases. Once the connection has been fully established, in the &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method you regularly call the Arduinos in Space &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method to check for new input and send commands. Finally, you ensure that callback functions are defined to handle data from the game, and send commands to the game using the &amp;lt;code&amp;gt;sendCommand()&amp;lt;/code&amp;gt; function or built in input handlers.&lt;br /&gt;
&lt;br /&gt;
== Breaking down HelloWorld ==&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s examine the different phases by looking at the above HelloWorld sketch line-by-line.&lt;br /&gt;
&lt;br /&gt;
=== Initial setup ===&lt;br /&gt;
&lt;br /&gt;
First, we need to include the Arduinos in Space library:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;ArduinosInSpace.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we create an Arduinos in Space object. We&amp;#039;ll use this object for all of our interactions with the game.&lt;br /&gt;
&lt;br /&gt;
The object constructor takes three arguments. The first is the serial object we&amp;#039;ll use. In most instances, this will just be &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, but SoftwareSerial and extended serial interfaces are also supported. The second argument is the number of ``request channels`` we&amp;#039;ll be creating - these are requests for data from the game. The third argument is the number of ``managed input pins`` that will send commands to the game. We&amp;#039;ll learn what these are later.&lt;br /&gt;
&lt;br /&gt;
For HelloWorld we create an object named &amp;lt;code&amp;gt;OIS&amp;lt;/code&amp;gt;, bind it to the serial connection named &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, with one data request and no commands being sent:&lt;br /&gt;
&lt;br /&gt;
 ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
Then we begin the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; function and move through connection phases with the game.&lt;br /&gt;
&lt;br /&gt;
=== Handshaking ===&lt;br /&gt;
&lt;br /&gt;
Before doing anything else, we need to begin the serial connection from the client side. Note that the game only supports communication at 9600 baud.&lt;br /&gt;
&lt;br /&gt;
 Serial.begin(9600);&lt;br /&gt;
&lt;br /&gt;
Now the game is in the Handshaking phase, just waiting for us to send a handshaking request. Arduinos in Space will handle the handshaking, we just have to call the &amp;lt;code&amp;gt;begin()&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
 OIS.begin();&lt;br /&gt;
&lt;br /&gt;
This will send the commands required to complete handshaking, and move in to the sync phase.&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
In the sync phase, the game is expecting us to send commands specifying what data we would like to receive, and what commands we would like to send, when the connection is active. Arduinos in Space has numerous methods available to register commands and request data. But for HelloWorld we just use one.&lt;br /&gt;
&lt;br /&gt;
Here, we&amp;#039;re requesting Boolean (either on or off) information about EMCON state - we&amp;#039;re asking the game to tell us if EMCON is on or off. When we request data like this, we need to tell Arduinos in Space what to do with it. For HelloWorld we tell the library to directly manage the LED_BUILTIN pin - this is an alias for the pin connected to the Arduino&amp;#039;s built-in LED. When requested in this way, Arduinos in Space will monitor the data sent from the game, and automatically set the pin &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt; depending on EMCON status.&lt;br /&gt;
&lt;br /&gt;
 OIS.requestBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
Once we&amp;#039;ve requested all of the inputs and outputs we&amp;#039;d like, we move to the active phase. Arduinos in Space does this by calling the &amp;lt;code&amp;gt;activate()&amp;lt;/code&amp;gt; method:&lt;br /&gt;
&lt;br /&gt;
 OIS.activate();&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s all that&amp;#039;s needed in the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; method, and we move to the active phase and the Arduino &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
=== Active ===&lt;br /&gt;
&lt;br /&gt;
Once in the active phase, the &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method is the workhorse of Arduinos in Space. This method reads incoming serial data from the game, parses it, processes the commands and data it contains. It also updates the status of managed input pins, sending commands back to the game if required.&lt;br /&gt;
&lt;br /&gt;
All this means that it needs to be called frequently. For HelloWorld, the &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method does nothing else:&lt;br /&gt;
&lt;br /&gt;
  OIS.update();&lt;br /&gt;
&lt;br /&gt;
Whenever the game sends a new EMCON status update, calling &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; will cause Arduinos in Space to read the data, and if EMCON is on it will turn on the LED_BUILTIN LED. If EMCON is off, LED_BUILTIN will be turned off.&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=ExternalProtocol&amp;diff=1436</id>
		<title>ExternalProtocol</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=ExternalProtocol&amp;diff=1436"/>
				<updated>2019-03-07T13:05:09Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Objects in space was made with the intention that it could be playable with just buttons.&lt;br /&gt;
&lt;br /&gt;
You can also get almost all the information from the in-game UI sent back to your Arduino or other external microcontroller that can speak Serial.&lt;br /&gt;
&lt;br /&gt;
There are 193 Commands [[Serial Commands]], 164 [[Serial Requests#Boolean Requests|Boolean Requests]], and 24 [[Serial Requests#Numeric Requests|Numeric Requests]] for a total of 381 commands and requests (source [http://forum.objectsgame.com:88/t/ois-arduino-code-during-beta/911/18?u=segwegler Zebra])&lt;br /&gt;
&lt;br /&gt;
== Protocol Details ==&lt;br /&gt;
&lt;br /&gt;
The protocol is outlined on the [http://objectsgame.com/the-controllers/ois-serial-data-protocol/ offical web site], however as of version 1.0.2 the implementation in-game deviates a little from the version 1 protocol docs.&lt;br /&gt;
&lt;br /&gt;
=== Line Endings ===&lt;br /&gt;
&lt;br /&gt;
Contrary to the documentation, the newline character is LF (Dec: 10, Hex 0x0A), not CR (Dec: 13, Hex 0x0D). Note that LF is usually encoded as &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;, so the samples provided are correct, just the description on the page is wrong.&lt;br /&gt;
&lt;br /&gt;
All lines sent by the game are terminated with a &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;, &amp;#039;&amp;#039;&amp;#039;except for&amp;#039;&amp;#039;&amp;#039; the handshaking phase.&lt;br /&gt;
&lt;br /&gt;
=== Handshaking ===&lt;br /&gt;
&lt;br /&gt;
To initiate a connection to the game, the client should send &amp;lt;code&amp;gt;451\n&amp;lt;/code&amp;gt;, not &amp;lt;code&amp;gt;SYN=1&amp;lt;/code&amp;gt;. The game will respond with &amp;lt;code&amp;gt;452\r\n&amp;lt;/code&amp;gt; (Note the response here contains a newline and a carriage return).&lt;br /&gt;
&lt;br /&gt;
=== Synchronisation ===&lt;br /&gt;
&lt;br /&gt;
All commands from the client are the reverse to what&amp;#039;s described in the documentation - the first parameter should be the text command, and the second the numerical channel. The correct forms of the examples given should be:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD=BURN_MAIN_ENGINE,4&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;NIB=MAIN_ENGINE_BURNING,1&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;NIN=POWER_LEVEL,2&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;NIF=CURRENT_SPEED,2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sources ===&lt;br /&gt;
&lt;br /&gt;
* [http://forum.objectsgame.com:88/t/ois-arduino-code-during-beta/911/13 Nocturnal]&lt;br /&gt;
* [https://bitbucket.org/pjhardy/arduinosinspace/src/87cf41381ac8cab9573cd5ed95976346e54991d8/protocol-notes.md?at=master&amp;amp;fileviewer=file-view-default stibbons]&lt;br /&gt;
&lt;br /&gt;
[[Category:HardwareInterfacing]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Getting_Started&amp;diff=1072</id>
		<title>Arduinos in Space Getting Started</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Getting_Started&amp;diff=1072"/>
				<updated>2018-08-18T05:42:45Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: /* Installing manually */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
&lt;br /&gt;
Any Arduino-compatible board should work. The Hello World sketch below needs a board with a built-in LED. All genuine Arduino/Genuino boards have one, as well as most Arduino-compatible boards.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Available as &amp;quot;ArduinosInSpace&amp;quot; in the Arduino Library Manager, and PlatformIO Library Manager.&lt;br /&gt;
&lt;br /&gt;
=== Arduino IDE ===&lt;br /&gt;
&lt;br /&gt;
Open the Arduino Library Manager (Sketch menu -&amp;gt; Include Library -&amp;gt; Manage Libraries...). Search for &amp;quot;ArduinosInSpace&amp;quot;, and install.&lt;br /&gt;
&lt;br /&gt;
=== PlatformIO ===&lt;br /&gt;
&lt;br /&gt;
[https://platformio.org/lib/show/5652/ArduinosInSpace pio lib install &amp;quot;ArduinosInSpace&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Installing manually ===&lt;br /&gt;
&lt;br /&gt;
* The git repository is available at [https://bitbucket.org/pjhardy/arduinosinspace/ https://bitbucket.org/pjhardy/arduinosinspace/]. New code doesn&amp;#039;t stay unreleased for long, but HEAD is sometimes a little ahead of releases, and almost always stable.&lt;br /&gt;
* Stable releases can be downloaded from [https://bitbucket.org/pjhardy/arduinosinspace/downloads/ https://bitbucket.org/pjhardy/arduinosinspace/downloads/].&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Getting_Started&amp;diff=1071</id>
		<title>Arduinos in Space Getting Started</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Getting_Started&amp;diff=1071"/>
				<updated>2018-08-18T05:41:48Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
&lt;br /&gt;
Any Arduino-compatible board should work. The Hello World sketch below needs a board with a built-in LED. All genuine Arduino/Genuino boards have one, as well as most Arduino-compatible boards.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Available as &amp;quot;ArduinosInSpace&amp;quot; in the Arduino Library Manager, and PlatformIO Library Manager.&lt;br /&gt;
&lt;br /&gt;
=== Arduino IDE ===&lt;br /&gt;
&lt;br /&gt;
Open the Arduino Library Manager (Sketch menu -&amp;gt; Include Library -&amp;gt; Manage Libraries...). Search for &amp;quot;ArduinosInSpace&amp;quot;, and install.&lt;br /&gt;
&lt;br /&gt;
=== PlatformIO ===&lt;br /&gt;
&lt;br /&gt;
[https://platformio.org/lib/show/5652/ArduinosInSpace pio lib install &amp;quot;ArduinosInSpace&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Installing manually ===&lt;br /&gt;
&lt;br /&gt;
* The git repository is available at [https://bitbucket.org/pjhardy/arduinosinspace/]. New code doesn&amp;#039;t stay unreleased for long, but HEAD is sometimes a little ahead of releases, and almost always stable.&lt;br /&gt;
* Stable releases can be downloaded from [https://bitbucket.org/pjhardy/arduinosinspace/downloads/].&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Getting_Started&amp;diff=1070</id>
		<title>Arduinos in Space Getting Started</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Getting_Started&amp;diff=1070"/>
				<updated>2018-08-18T05:39:37Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
&lt;br /&gt;
Any Arduino-compatible board should work. The Hello World sketch below needs a board with a built-in LED. All genuine Arduino/Genuino boards have one, as well as most Arduino-compatible boards.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Available as &amp;quot;ArduinosInSpace&amp;quot; in the Arduino Library Manager, and PlatformIO Library Manager.&lt;br /&gt;
&lt;br /&gt;
=== Arduino IDE ===&lt;br /&gt;
&lt;br /&gt;
Open the Arduino Library Manager (Sketch menu -&amp;gt; Include Library -&amp;gt; Manage Libraries...). Search for &amp;quot;ArduinosInSpace&amp;quot;, and install.&lt;br /&gt;
&lt;br /&gt;
=== PlatformIO ===&lt;br /&gt;
&lt;br /&gt;
[https://platformio.org/lib/show/5652/ArduinosInSpace pio lib install &amp;quot;ArduinosInSpace&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Installing manually ===&lt;br /&gt;
&lt;br /&gt;
* The git repository is available at [https://bitbucket.org/pjhardy/arduinosinspace/]. HEAD is... usually stable.&lt;br /&gt;
* Stable releases can be downloaded from [https://bitbucket.org/pjhardy/arduinosinspace/downloads/].&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=1067</id>
		<title>Arduinos in Space</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=1067"/>
				<updated>2018-08-15T12:57:06Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://bitbucket.org/pjhardy/arduinosinspace/src/master/ Arduinos in Space] is an Arduino library to interface with Objects in Space. It aims to provide a high level, Arduino-like interface while still being powerful and flexible.&lt;br /&gt;
&lt;br /&gt;
Arduinos in Space is an open source library, that was neither written nor supported by Flat Earth.&lt;br /&gt;
&lt;br /&gt;
== Arduinos in Space resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Arduinos in Space Getting Started|Getting started]]&lt;br /&gt;
* [[Arduinos in Space Hello World|Hello World]]&lt;br /&gt;
* [[Arduinos in Space Concepts]]&lt;br /&gt;
* [[Arduinos in Space API]]&lt;br /&gt;
&lt;br /&gt;
== Resources elsewhere ==&lt;br /&gt;
&lt;br /&gt;
Arduinos in Space comes with several example sketches illustrating basic usage. These are available in the Arduino IDE under File -&amp;gt; Examples -&amp;gt; Arduinos in Space.&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Hello_World&amp;diff=1066</id>
		<title>Arduinos in Space Hello World</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Hello_World&amp;diff=1066"/>
				<updated>2018-08-15T12:55:44Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First, ensure Objects in Space is configured to talk to hardware, following the directions in [[Getting started with hardware]].&lt;br /&gt;
&lt;br /&gt;
Open the Arduino IDE, create a new sketch (File -&amp;gt; New), and enter the following code:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#include &amp;quot;ArduinosInSpace.h:&lt;br /&gt;
&lt;br /&gt;
ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  OIS.begin();&lt;br /&gt;
&lt;br /&gt;
  OIS.registerBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
  OIS.activate();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  OIS.update();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save this (call it something like &amp;quot;HelloWorld&amp;quot;, then build and upload to your board. With the board still connected, ensure the Arduino serial monitor is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; running, and launch Objects in Space. All going well, the game will open a connection to your board, and the built-in LED on your board will turn on to indicate when EMCON mode is active.&lt;br /&gt;
&lt;br /&gt;
== Understanding Arduinos in Space ==&lt;br /&gt;
&lt;br /&gt;
=== Objects in Space connections ===&lt;br /&gt;
&lt;br /&gt;
Before getting in to how Arduinos in Space, let&amp;#039;s talk about how the game communicates with devices. A connection between Objects in Space (the server) and an Arduino (the client) has three separate phases:&lt;br /&gt;
&lt;br /&gt;
* Handshaking: the server is listening for an initial request from the client.&lt;br /&gt;
* Syncing: the client sends commands to the server defining expected inputs and outputs.&lt;br /&gt;
* Active: the server is able to send game data to the client, and the client is able to send commands to the server.&lt;br /&gt;
&lt;br /&gt;
=== Arduinos in Space overview ===&lt;br /&gt;
&lt;br /&gt;
Using Arduinos in Space is fairly straightforward.  In the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; method of your sketch you start by setting up a serial connection with the game, and creating an Arduinos in Space object that will manage the connection. Then you use methods on that object to progress through the different connection phases. Once the connection has been fully established, in the &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method you regularly call the Arduinos in Space &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method to check for new input and send commands. Finally, you ensure that callback functions are defined to handle data from the game, and send commands to the game using the &amp;lt;code&amp;gt;sendCommand()&amp;lt;/code&amp;gt; function or built in input handlers.&lt;br /&gt;
&lt;br /&gt;
== Breaking down HelloWorld ==&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s examine the different phases by looking at the above HelloWorld sketch line-by-line.&lt;br /&gt;
&lt;br /&gt;
=== Initial setup ===&lt;br /&gt;
&lt;br /&gt;
First, we need to include the Arduinos in Space library:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;ArduinosInSpace.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we create an Arduinos in Space object. We&amp;#039;ll use this object for all of our interactions with the game.&lt;br /&gt;
&lt;br /&gt;
The object constructor takes three arguments. The first is the serial object we&amp;#039;ll use. In most instances, this will just be &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, but SoftwareSerial and extended serial interfaces are also supported. The second argument is the number of ``request channels`` we&amp;#039;ll be creating - these are requests for data from the game. The third argument is the number of ``managed input pins`` that will send commands to the game. We&amp;#039;ll learn what these are later.&lt;br /&gt;
&lt;br /&gt;
For HelloWorld we create an object named &amp;lt;code&amp;gt;OIS&amp;lt;/code&amp;gt;, bind it to the serial connection named &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, with one data request and no commands being sent:&lt;br /&gt;
&lt;br /&gt;
 ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
Then we begin the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; function and move through connection phases with the game.&lt;br /&gt;
&lt;br /&gt;
=== Handshaking ===&lt;br /&gt;
&lt;br /&gt;
Before doing anything else, we need to begin the serial connection from the client side. Note that the game only supports communication at 9600 baud.&lt;br /&gt;
&lt;br /&gt;
 Serial.begin(9600);&lt;br /&gt;
&lt;br /&gt;
Now the game is in the Handshaking phase, just waiting for us to send a handshaking request. Arduinos in Space will handle the handshaking, we just have to call the &amp;lt;code&amp;gt;begin()&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
 OIS.begin();&lt;br /&gt;
&lt;br /&gt;
This will send the commands required to complete handshaking, and move in to the sync phase.&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
In the sync phase, the game is expecting us to send commands specifying what data we would like to receive, and what commands we would like to send, when the connection is active. Arduinos in Space has numerous methods available to register commands and request data. But for HelloWorld we just use one.&lt;br /&gt;
&lt;br /&gt;
Here, we&amp;#039;re requesting Boolean (either on or off) information about EMCON state - we&amp;#039;re asking the game to tell us if EMCON is on or off. When we request data like this, we need to tell Arduinos in Space what to do with it. For HelloWorld we tell the library to directly manage the LED_BUILTIN pin - this is an alias for the pin connected to the Arduino&amp;#039;s built-in LED. When requested in this way, Arduinos in Space will monitor the data sent from the game, and automatically set the pin &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt; depending on EMCON status.&lt;br /&gt;
&lt;br /&gt;
 OIS.requestBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
Once we&amp;#039;ve requested all of the inputs and outputs we&amp;#039;d like, we move to the active phase. Arduinos in Space does this by calling the &amp;lt;code&amp;gt;activate()&amp;lt;/code&amp;gt; method:&lt;br /&gt;
&lt;br /&gt;
 OIS.activate();&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s all that&amp;#039;s needed in the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; method, and we move to the active phase and the Arduino &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
=== Active ===&lt;br /&gt;
&lt;br /&gt;
Once in the active phase, the &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method is the workhorse of Arduinos in Space. This method reads incoming serial data from the game, parses it, processes the commands and data it contains. It also updates the status of managed input pins, sending commands back to the game if required.&lt;br /&gt;
&lt;br /&gt;
All this means that it needs to be called frequently. For HelloWorld, the &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method does nothing else:&lt;br /&gt;
&lt;br /&gt;
  OIS.update();&lt;br /&gt;
&lt;br /&gt;
Whenever the game sends a new EMCON status update, calling &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; will cause Arduinos in Space to read the data, and if EMCON is on it will turn on the LED_BUILTIN LED. If EMCON is off, LED_BUILTIN will be turned off.&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Hello_World&amp;diff=1065</id>
		<title>Arduinos in Space Hello World</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Hello_World&amp;diff=1065"/>
				<updated>2018-08-15T12:55:17Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: Created page with &amp;quot;First, ensure Objects in Space is configured to talk to hardware, following the directions in Getting started with hardware.  Open the Arduino IDE, create a new sketch (Fi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First, ensure Objects in Space is configured to talk to hardware, following the directions in [[Getting started with hardware]].&lt;br /&gt;
&lt;br /&gt;
Open the Arduino IDE, create a new sketch (File -&amp;gt; New), and enter the following code:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#include &amp;quot;ArduinosInSpace.h:&lt;br /&gt;
&lt;br /&gt;
ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  OIS.begin();&lt;br /&gt;
&lt;br /&gt;
  OIS.registerBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
  OIS.activate();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  OIS.update();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save this (call it something like &amp;quot;HelloWorld&amp;quot;, then build and upload to your board. With the board still connected, ensure the Arduino serial monitor is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; running, and launch Objects in Space. All going well, the game will open a connection to your board, and the built-in LED on your board will turn on to indicate when EMCON mode is active.&lt;br /&gt;
&lt;br /&gt;
== Understanding Arduinos in Space ==&lt;br /&gt;
&lt;br /&gt;
=== Objects in Space connections ===&lt;br /&gt;
&lt;br /&gt;
Before getting in to how Arduinos in Space, let&amp;#039;s talk about how the game communicates with devices. A connection between Objects in Space (the server) and an Arduino (the client) has three separate phases:&lt;br /&gt;
&lt;br /&gt;
* Handshaking: the server is listening for an initial request from the client.&lt;br /&gt;
* Syncing: the client sends commands to the server defining expected inputs and outputs.&lt;br /&gt;
* Active: the server is able to send game data to the client, and the client is able to send commands to the server.&lt;br /&gt;
&lt;br /&gt;
=== Arduinos in Space overview ===&lt;br /&gt;
&lt;br /&gt;
Using Arduinos in Space is fairly straightforward.  In the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; method of your sketch you start by setting up a serial connection with the game, and creating an Arduinos in Space object that will manage the connection. Then you use methods on that object to progress through the different connection phases. Once the connection has been fully established, in the &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method you regularly call the Arduinos in Space &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method to check for new input and send commands. Finally, you ensure that callback functions are defined to handle data from the game, and send commands to the game using the &amp;lt;code&amp;gt;sendCommand()&amp;lt;/code&amp;gt; function or built in input handlers.&lt;br /&gt;
&lt;br /&gt;
== Breaking down HelloWorld ==&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s examine the different phases by looking at the above HelloWorld sketch line-by-line.&lt;br /&gt;
&lt;br /&gt;
=== Initial setup ===&lt;br /&gt;
&lt;br /&gt;
First, we need to include the Arduinos in Space library:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;ArduinosInSpace.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we create an Arduinos in Space object. We&amp;#039;ll use this object for all of our interactions with the game.&lt;br /&gt;
&lt;br /&gt;
The object constructor takes three arguments. The first is the serial object we&amp;#039;ll use. In most instances, this will just be &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, but SoftwareSerial and extended serial interfaces are also supported. The second argument is the number of ``request channels`` we&amp;#039;ll be creating - these are requests for data from the game. The third argument is the number of ``managed input pins`` that will send commands to the game. We&amp;#039;ll learn what these are later.&lt;br /&gt;
&lt;br /&gt;
For HelloWorld we create an object named &amp;lt;code&amp;gt;OIS&amp;lt;/code&amp;gt;, bind it to the serial connection named &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, with one data request and no commands being sent:&lt;br /&gt;
&lt;br /&gt;
 ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
Then we begin the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; function and move through connection phases with the game.&lt;br /&gt;
&lt;br /&gt;
=== Handshaking ===&lt;br /&gt;
&lt;br /&gt;
Before doing anything else, we need to begin the serial connection from the client side. Note that the game only supports communication at 9600 baud.&lt;br /&gt;
&lt;br /&gt;
 Serial.begin(9600);&lt;br /&gt;
&lt;br /&gt;
Now the game is in the Handshaking phase, just waiting for us to send a handshaking request. Arduinos in Space will handle the handshaking, we just have to call the &amp;lt;code&amp;gt;begin()&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
 OIS.begin();&lt;br /&gt;
&lt;br /&gt;
This will send the commands required to complete handshaking, and move in to the sync phase.&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
In the sync phase, the game is expecting us to send commands specifying what data we would like to receive, and what commands we would like to send, when the connection is active. Arduinos in Space has numerous methods available to register commands and request data. But for HelloWorld we just use one.&lt;br /&gt;
&lt;br /&gt;
Here, we&amp;#039;re requesting Boolean (either on or off) information about EMCON state - we&amp;#039;re asking the game to tell us if EMCON is on or off. When we request data like this, we need to tell Arduinos in Space what to do with it. For HelloWorld we tell the library to directly manage the LED_BUILTIN pin - this is an alias for the pin connected to the Arduino&amp;#039;s built-in LED. When requested in this way, Arduinos in Space will monitor the data sent from the game, and automatically set the pin &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt; depending on EMCON status.&lt;br /&gt;
&lt;br /&gt;
 OIS.requestBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
Once we&amp;#039;ve requested all of the inputs and outputs we&amp;#039;d like, we move to the active phase. Arduinos in Space does this by calling the &amp;lt;code&amp;gt;activate()&amp;lt;/code&amp;gt; method:&lt;br /&gt;
&lt;br /&gt;
 OIS.activate();&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s all that&amp;#039;s needed in the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; method, and we move to the active phase and the Arduino &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
=== Active ===&lt;br /&gt;
&lt;br /&gt;
Once in the active phase, the &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method is the workhorse of Arduinos in Space. This method reads incoming serial data from the game, parses it, processes the commands and data it contains. It also updates the status of managed input pins, sending commands back to the game if required.&lt;br /&gt;
&lt;br /&gt;
All this means that it needs to be called frequently. For HelloWorld, the &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method does nothing else:&lt;br /&gt;
&lt;br /&gt;
  OIS.update();&lt;br /&gt;
&lt;br /&gt;
Whenever the game sends a new EMCON status update, calling &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; will cause Arduinos in Space to read the data, and if EMCON is on it will turn on the LED_BUILTIN LED. If EMCON is off, LED_BUILTIN will be turned off.&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=1064</id>
		<title>Arduinos in Space</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=1064"/>
				<updated>2018-08-15T12:54:42Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://bitbucket.org/pjhardy/arduinosinspace/src/master/ Arduinos in Space] is an Arduino library to interface with Objects in Space. It aims to provide a high level, Arduino-like interface while still being powerful and flexible.&lt;br /&gt;
&lt;br /&gt;
Arduinos in Space is an open source library, that was neither written nor supported by Flat Earth.&lt;br /&gt;
&lt;br /&gt;
== Arduinos in Space resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Arduinos in Space Getting Started|Getting started]]&lt;br /&gt;
* [[Arduinos in Space Hello World|Hello World]]&lt;br /&gt;
* [[Arduinos in Space Concepts]]&lt;br /&gt;
* [[Arduinos in Space API]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Going further ==&lt;br /&gt;
&lt;br /&gt;
Objects in Space can send a lot more data to a serial device. It can also accept commands. This is all supported by Arduinos in Space. The library comes with several example sketches (available in the Arduino IDE under File -&amp;gt; Examples -&amp;gt; Arduinos in Space).&lt;br /&gt;
&lt;br /&gt;
[[Arduinos in Space API]] contains a full API reference.&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Getting_Started&amp;diff=1063</id>
		<title>Arduinos in Space Getting Started</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Getting_Started&amp;diff=1063"/>
				<updated>2018-08-15T12:53:54Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
&lt;br /&gt;
Any Arduino-compatible board should work. The Hello World sketch below needs a board with a built-in LED. All genuine Arduino/Genuino boards have one, as well as most Arduino-compatible boards.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
The library is not (yet) available through the Arduino Library Manager, so must be installed manually.&lt;br /&gt;
&lt;br /&gt;
# Download the most recent release from the [https://bitbucket.org/pjhardy/arduinosinspace/downloads/ downloads section] of the library repository on Bitbucket.&lt;br /&gt;
# Open the Arduino IDE, and navigate to Sketch -&amp;gt; Include Library -&amp;gt; Add .ZIP Library...&lt;br /&gt;
# Select the zip file previously downloaded.&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Getting_Started&amp;diff=1062</id>
		<title>Arduinos in Space Getting Started</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_Getting_Started&amp;diff=1062"/>
				<updated>2018-08-15T12:52:58Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: Created page with &amp;quot;== Requirements ==  Any Arduino-compatible board should work. The Hello World sketch below needs a board with a built-in LED. All genuine Arduino/Genuino boards have one, as w...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requirements ==&lt;br /&gt;
&lt;br /&gt;
Any Arduino-compatible board should work. The Hello World sketch below needs a board with a built-in LED. All genuine Arduino/Genuino boards have one, as well as most Arduino-compatible boards.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
The library is not (yet) available through the Arduino Library Manager, so must be installed manually.&lt;br /&gt;
&lt;br /&gt;
# Download the most recent release from the [https://bitbucket.org/pjhardy/arduinosinspace/downloads/ downloads section] of the library repository on Bitbucket.&lt;br /&gt;
# Open the Arduino IDE, and navigate to Sketch -&amp;gt; Include Library -&amp;gt; Add .ZIP Library...&lt;br /&gt;
# Select the zip file previously downloaded.&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=1061</id>
		<title>Arduinos in Space</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=1061"/>
				<updated>2018-08-15T12:52:36Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://bitbucket.org/pjhardy/arduinosinspace/src/master/ Arduinos in Space] is an Arduino library to interface with Objects in Space. It aims to provide a high level, Arduino-like interface while still being powerful and flexible.&lt;br /&gt;
&lt;br /&gt;
Arduinos in Space is an open source library, that was neither written nor supported by Flat Earth.&lt;br /&gt;
&lt;br /&gt;
== Arduinos in Space resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Arduinos in Space Getting Started|Getting started]]&lt;br /&gt;
* [[Arduinos in Space Hello World|Hello World]]&lt;br /&gt;
* [[Arduinos in Space Concepts]]&lt;br /&gt;
* [[Arduinos in Space API]]&lt;br /&gt;
&lt;br /&gt;
== Hello World ==&lt;br /&gt;
&lt;br /&gt;
First, ensure Objects in Space is configured to talk to hardware, following the directions in [[Getting started with hardware]].&lt;br /&gt;
&lt;br /&gt;
Open the Arduino IDE, create a new sketch (File -&amp;gt; New), and enter the following code:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#include &amp;quot;ArduinosInSpace.h:&lt;br /&gt;
&lt;br /&gt;
ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  OIS.begin();&lt;br /&gt;
&lt;br /&gt;
  OIS.registerBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
  OIS.activate();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  OIS.update();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save this (call it something like &amp;quot;HelloWorld&amp;quot;, then build and upload to your board. With the board still connected, ensure the Arduino serial monitor is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; running, and launch Objects in Space. All going well, the game will open a connection to your board, and the built-in LED on your board will turn on to indicate when EMCON mode is active.&lt;br /&gt;
&lt;br /&gt;
== Understanding Arduinos in Space ==&lt;br /&gt;
&lt;br /&gt;
=== Objects in Space connections ===&lt;br /&gt;
&lt;br /&gt;
Before getting in to how Arduinos in Space, let&amp;#039;s talk about how the game communicates with devices. A connection between Objects in Space (the server) and an Arduino (the client) has three separate phases:&lt;br /&gt;
&lt;br /&gt;
* Handshaking: the server is listening for an initial request from the client.&lt;br /&gt;
* Syncing: the client sends commands to the server defining expected inputs and outputs.&lt;br /&gt;
* Active: the server is able to send game data to the client, and the client is able to send commands to the server.&lt;br /&gt;
&lt;br /&gt;
=== Arduinos in Space overview ===&lt;br /&gt;
&lt;br /&gt;
Using Arduinos in Space is fairly straightforward.  In the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; method of your sketch you start by setting up a serial connection with the game, and creating an Arduinos in Space object that will manage the connection. Then you use methods on that object to progress through the different connection phases. Once the connection has been fully established, in the &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method you regularly call the Arduinos in Space &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method to check for new input and send commands. Finally, you ensure that callback functions are defined to handle data from the game, and send commands to the game using the &amp;lt;code&amp;gt;sendCommand()&amp;lt;/code&amp;gt; function or built in input handlers.&lt;br /&gt;
&lt;br /&gt;
== Breaking down HelloWorld ==&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s examine the different phases by looking at the above HelloWorld sketch line-by-line.&lt;br /&gt;
&lt;br /&gt;
=== Initial setup ===&lt;br /&gt;
&lt;br /&gt;
First, we need to include the Arduinos in Space library:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;ArduinosInSpace.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we create an Arduinos in Space object. We&amp;#039;ll use this object for all of our interactions with the game.&lt;br /&gt;
&lt;br /&gt;
The object constructor takes three arguments. The first is the serial object we&amp;#039;ll use. In most instances, this will just be &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, but SoftwareSerial and extended serial interfaces are also supported. The second argument is the number of ``request channels`` we&amp;#039;ll be creating - these are requests for data from the game. The third argument is the number of ``managed input pins`` that will send commands to the game. We&amp;#039;ll learn what these are later.&lt;br /&gt;
&lt;br /&gt;
For HelloWorld we create an object named &amp;lt;code&amp;gt;OIS&amp;lt;/code&amp;gt;, bind it to the serial connection named &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, with one data request and no commands being sent:&lt;br /&gt;
&lt;br /&gt;
 ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
Then we begin the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; function and move through connection phases with the game.&lt;br /&gt;
&lt;br /&gt;
=== Handshaking ===&lt;br /&gt;
&lt;br /&gt;
Before doing anything else, we need to begin the serial connection from the client side. Note that the game only supports communication at 9600 baud.&lt;br /&gt;
&lt;br /&gt;
 Serial.begin(9600);&lt;br /&gt;
&lt;br /&gt;
Now the game is in the Handshaking phase, just waiting for us to send a handshaking request. Arduinos in Space will handle the handshaking, we just have to call the &amp;lt;code&amp;gt;begin()&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
 OIS.begin();&lt;br /&gt;
&lt;br /&gt;
This will send the commands required to complete handshaking, and move in to the sync phase.&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
In the sync phase, the game is expecting us to send commands specifying what data we would like to receive, and what commands we would like to send, when the connection is active. Arduinos in Space has numerous methods available to register commands and request data. But for HelloWorld we just use one.&lt;br /&gt;
&lt;br /&gt;
Here, we&amp;#039;re requesting Boolean (either on or off) information about EMCON state - we&amp;#039;re asking the game to tell us if EMCON is on or off. When we request data like this, we need to tell Arduinos in Space what to do with it. For HelloWorld we tell the library to directly manage the LED_BUILTIN pin - this is an alias for the pin connected to the Arduino&amp;#039;s built-in LED. When requested in this way, Arduinos in Space will monitor the data sent from the game, and automatically set the pin &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt; depending on EMCON status.&lt;br /&gt;
&lt;br /&gt;
 OIS.requestBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
Once we&amp;#039;ve requested all of the inputs and outputs we&amp;#039;d like, we move to the active phase. Arduinos in Space does this by calling the &amp;lt;code&amp;gt;activate()&amp;lt;/code&amp;gt; method:&lt;br /&gt;
&lt;br /&gt;
 OIS.activate();&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s all that&amp;#039;s needed in the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; method, and we move to the active phase and the Arduino &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
=== Active ===&lt;br /&gt;
&lt;br /&gt;
Once in the active phase, the &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method is the workhorse of Arduinos in Space. This method reads incoming serial data from the game, parses it, processes the commands and data it contains. It also updates the status of managed input pins, sending commands back to the game if required.&lt;br /&gt;
&lt;br /&gt;
All this means that it needs to be called frequently. For HelloWorld, the &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method does nothing else:&lt;br /&gt;
&lt;br /&gt;
  OIS.update();&lt;br /&gt;
&lt;br /&gt;
Whenever the game sends a new EMCON status update, calling &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; will cause Arduinos in Space to read the data, and if EMCON is on it will turn on the LED_BUILTIN LED. If EMCON is off, LED_BUILTIN will be turned off.&lt;br /&gt;
&lt;br /&gt;
== Going further ==&lt;br /&gt;
&lt;br /&gt;
Objects in Space can send a lot more data to a serial device. It can also accept commands. This is all supported by Arduinos in Space. The library comes with several example sketches (available in the Arduino IDE under File -&amp;gt; Examples -&amp;gt; Arduinos in Space).&lt;br /&gt;
&lt;br /&gt;
[[Arduinos in Space API]] contains a full API reference.&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=1060</id>
		<title>Arduinos in Space</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=1060"/>
				<updated>2018-08-15T12:41:15Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://bitbucket.org/pjhardy/arduinosinspace/src/master/ Arduinos in Space] is an Arduino library to interface with Objects in Space. It aims to provide a high level, Arduino-like interface while still being powerful and flexible.&lt;br /&gt;
&lt;br /&gt;
Arduinos in Space is an open source library, that was neither written nor supported by Flat Earth.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Any Arduino-compatible board should work. The Hello World sketch below needs a board with a built-in LED. All genuine Arduino/Genuino boards have one, as well as most Arduino-compatible boards.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
The library is not (yet) available through the Arduino Library Manager, so must be installed manually.&lt;br /&gt;
&lt;br /&gt;
# Download the most recent release from the [https://bitbucket.org/pjhardy/arduinosinspace/downloads/ downloads section] of the library repository on Bitbucket.&lt;br /&gt;
# Open the Arduino IDE, and navigate to Sketch -&amp;gt; Include Library -&amp;gt; Add .ZIP Library...&lt;br /&gt;
# Select the zip file previously downloaded.&lt;br /&gt;
&lt;br /&gt;
== Hello World ==&lt;br /&gt;
&lt;br /&gt;
First, ensure Objects in Space is configured to talk to hardware, following the directions in [[Getting started with hardware]].&lt;br /&gt;
&lt;br /&gt;
Open the Arduino IDE, create a new sketch (File -&amp;gt; New), and enter the following code:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#include &amp;quot;ArduinosInSpace.h:&lt;br /&gt;
&lt;br /&gt;
ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  OIS.begin();&lt;br /&gt;
&lt;br /&gt;
  OIS.registerBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
  OIS.activate();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  OIS.update();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save this (call it something like &amp;quot;HelloWorld&amp;quot;, then build and upload to your board. With the board still connected, ensure the Arduino serial monitor is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; running, and launch Objects in Space. All going well, the game will open a connection to your board, and the built-in LED on your board will turn on to indicate when EMCON mode is active.&lt;br /&gt;
&lt;br /&gt;
== Understanding Arduinos in Space ==&lt;br /&gt;
&lt;br /&gt;
=== Objects in Space connections ===&lt;br /&gt;
&lt;br /&gt;
Before getting in to how Arduinos in Space, let&amp;#039;s talk about how the game communicates with devices. A connection between Objects in Space (the server) and an Arduino (the client) has three separate phases:&lt;br /&gt;
&lt;br /&gt;
* Handshaking: the server is listening for an initial request from the client.&lt;br /&gt;
* Syncing: the client sends commands to the server defining expected inputs and outputs.&lt;br /&gt;
* Active: the server is able to send game data to the client, and the client is able to send commands to the server.&lt;br /&gt;
&lt;br /&gt;
=== Arduinos in Space overview ===&lt;br /&gt;
&lt;br /&gt;
Using Arduinos in Space is fairly straightforward.  In the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; method of your sketch you start by setting up a serial connection with the game, and creating an Arduinos in Space object that will manage the connection. Then you use methods on that object to progress through the different connection phases. Once the connection has been fully established, in the &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method you regularly call the Arduinos in Space &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method to check for new input and send commands. Finally, you ensure that callback functions are defined to handle data from the game, and send commands to the game using the &amp;lt;code&amp;gt;sendCommand()&amp;lt;/code&amp;gt; function or built in input handlers.&lt;br /&gt;
&lt;br /&gt;
== Breaking down HelloWorld ==&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s examine the different phases by looking at the above HelloWorld sketch line-by-line.&lt;br /&gt;
&lt;br /&gt;
=== Initial setup ===&lt;br /&gt;
&lt;br /&gt;
First, we need to include the Arduinos in Space library:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;ArduinosInSpace.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we create an Arduinos in Space object. We&amp;#039;ll use this object for all of our interactions with the game.&lt;br /&gt;
&lt;br /&gt;
The object constructor takes three arguments. The first is the serial object we&amp;#039;ll use. In most instances, this will just be &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, but SoftwareSerial and extended serial interfaces are also supported. The second argument is the number of ``request channels`` we&amp;#039;ll be creating - these are requests for data from the game. The third argument is the number of ``managed input pins`` that will send commands to the game. We&amp;#039;ll learn what these are later.&lt;br /&gt;
&lt;br /&gt;
For HelloWorld we create an object named &amp;lt;code&amp;gt;OIS&amp;lt;/code&amp;gt;, bind it to the serial connection named &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, with one data request and no commands being sent:&lt;br /&gt;
&lt;br /&gt;
 ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
Then we begin the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; function and move through connection phases with the game.&lt;br /&gt;
&lt;br /&gt;
=== Handshaking ===&lt;br /&gt;
&lt;br /&gt;
Before doing anything else, we need to begin the serial connection from the client side. Note that the game only supports communication at 9600 baud.&lt;br /&gt;
&lt;br /&gt;
 Serial.begin(9600);&lt;br /&gt;
&lt;br /&gt;
Now the game is in the Handshaking phase, just waiting for us to send a handshaking request. Arduinos in Space will handle the handshaking, we just have to call the &amp;lt;code&amp;gt;begin()&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
 OIS.begin();&lt;br /&gt;
&lt;br /&gt;
This will send the commands required to complete handshaking, and move in to the sync phase.&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
In the sync phase, the game is expecting us to send commands specifying what data we would like to receive, and what commands we would like to send, when the connection is active. Arduinos in Space has numerous methods available to register commands and request data. But for HelloWorld we just use one.&lt;br /&gt;
&lt;br /&gt;
Here, we&amp;#039;re requesting Boolean (either on or off) information about EMCON state - we&amp;#039;re asking the game to tell us if EMCON is on or off. When we request data like this, we need to tell Arduinos in Space what to do with it. For HelloWorld we tell the library to directly manage the LED_BUILTIN pin - this is an alias for the pin connected to the Arduino&amp;#039;s built-in LED. When requested in this way, Arduinos in Space will monitor the data sent from the game, and automatically set the pin &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt; depending on EMCON status.&lt;br /&gt;
&lt;br /&gt;
 OIS.requestBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
Once we&amp;#039;ve requested all of the inputs and outputs we&amp;#039;d like, we move to the active phase. Arduinos in Space does this by calling the &amp;lt;code&amp;gt;activate()&amp;lt;/code&amp;gt; method:&lt;br /&gt;
&lt;br /&gt;
 OIS.activate();&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s all that&amp;#039;s needed in the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; method, and we move to the active phase and the Arduino &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
=== Active ===&lt;br /&gt;
&lt;br /&gt;
Once in the active phase, the &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method is the workhorse of Arduinos in Space. This method reads incoming serial data from the game, parses it, processes the commands and data it contains. It also updates the status of managed input pins, sending commands back to the game if required.&lt;br /&gt;
&lt;br /&gt;
All this means that it needs to be called frequently. For HelloWorld, the &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method does nothing else:&lt;br /&gt;
&lt;br /&gt;
  OIS.update();&lt;br /&gt;
&lt;br /&gt;
Whenever the game sends a new EMCON status update, calling &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; will cause Arduinos in Space to read the data, and if EMCON is on it will turn on the LED_BUILTIN LED. If EMCON is off, LED_BUILTIN will be turned off.&lt;br /&gt;
&lt;br /&gt;
== Going further ==&lt;br /&gt;
&lt;br /&gt;
Objects in Space can send a lot more data to a serial device. It can also accept commands. This is all supported by Arduinos in Space. The library comes with several example sketches (available in the Arduino IDE under File -&amp;gt; Examples -&amp;gt; Arduinos in Space).&lt;br /&gt;
&lt;br /&gt;
[[Arduinos in Space API]] contains a full API reference.&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_API&amp;diff=1059</id>
		<title>Arduinos in Space API</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_API&amp;diff=1059"/>
				<updated>2018-08-15T12:29:36Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ObjectsInSpace class ==&lt;br /&gt;
&lt;br /&gt;
This is the main interface for Arduinos In Space. A single ObjectsInSpace object manages all aspects of a serial connection. It provides an interface to send commands to the game, and can poll input pins to trigger those commannds. It also allows to request data from the game, and will pass received data to a specified output pin, or a callback function for more complex requests.&lt;br /&gt;
&lt;br /&gt;
=== Constructors ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;ObjectsInSpace( Stream &amp;amp; serial,&lt;br /&gt;
                     int numRequests,&lt;br /&gt;
                     int numCommandPins&lt;br /&gt;
              )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates an ObjectsInSpace object to manage a serial connection. Note that this constructor will &amp;#039;&amp;#039;not&amp;#039;&amp;#039; attempt to start the serial interface, it must be started separately with eg &amp;lt;tt&amp;gt;Serial.begin()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;serial&amp;lt;/tt&amp;gt; The serial instance this object will use to communicate with the game. Usually &amp;lt;tt&amp;gt;Serial&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;numRequests&amp;lt;/tt&amp;gt; The number of request channels to allocate. This is the maximum number of requests for data this object will support. It does &amp;#039;&amp;#039;not&amp;#039;&amp;#039; include command channels.&lt;br /&gt;
* &amp;lt;tt&amp;gt;numCommandPins&amp;lt;/tt&amp;gt; The number of &amp;#039;&amp;#039;managed&amp;#039;&amp;#039; input pins to allocate. This is the maximum number of commands channels with managed input pins (created via &amp;lt;tt&amp;gt;registerLatching()&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;registerTrigger()&amp;lt;/tt&amp;gt;) the object will support. Commands that will be send directly through &amp;lt;tt&amp;gt;sendCommand()&amp;lt;/tt&amp;gt; do not need to be included here.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;ObjectsInSpace( Stream &amp;amp; serial,&lt;br /&gt;
                     int numRequests&lt;br /&gt;
              )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this constructor is &amp;#039;&amp;#039;&amp;#039;deprecated&amp;#039;&amp;#039;&amp;#039;, and will be removed in a future release. Identical to the main constructor, but the created object will not be able to support any managed input pins.&lt;br /&gt;
&lt;br /&gt;
=== Member functions ===&lt;br /&gt;
&lt;br /&gt;
==== Handshaking phase ====&lt;br /&gt;
===== begin() =====&lt;br /&gt;
&lt;br /&gt;
Initialise the connection, and perform handshaking with the game.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;void ObjectsInSpace::begin()&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;begin()&amp;lt;/tt&amp;gt; function will periodically send a handshake request packet, and wait for the game to send a successful response. This is a blocking function - it won&amp;#039;t return until handshaking is successful and the game has moved to the Synchronisation phase of the connection.&lt;br /&gt;
&lt;br /&gt;
==== Synchronisation phase ====&lt;br /&gt;
===== activate() =====&lt;br /&gt;
&lt;br /&gt;
Start active phase&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;void ObjectsInSpace::activate()&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;activate()&amp;lt;/tt&amp;gt; function tells the game that we have completed synchronising commands and requests with the game, and are ready to move in to the active phase of the connection. The game will start sending live data and processing game commands we send.&lt;br /&gt;
&lt;br /&gt;
==== Request channels ====&lt;br /&gt;
&lt;br /&gt;
These functions, executed during the synchronisation phase, set up channels requesting data from the game.&lt;br /&gt;
&lt;br /&gt;
===== registerBool() =====&lt;br /&gt;
&lt;br /&gt;
Register a request for boolean data (true/false, 1/0, on/off).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerBool( OISCommand command,&lt;br /&gt;
                                         int pin,&lt;br /&gt;
                                        bool invert=false&lt;br /&gt;
                                )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will create a channel to receive the requested boolean data from the game. When data on this channel is received, Arduinos in Space will change the status of the given output pin to match the data received. Note that this function also sets the pin mode appropriately, there is no need for a separate &amp;lt;tt&amp;gt;pinMode()&amp;lt;/tt&amp;gt; call. The maximum number of request channels that can be created is specified by the numRequests argument to the ObjectsInSpace constructor. Attempts to request more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;command&amp;lt;/tt&amp;gt; The data command to request.&lt;br /&gt;
* &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt; A pin number to control.&lt;br /&gt;
* &amp;lt;tt&amp;gt;invert&amp;lt;/tt&amp;gt; By default, the output pin will be set high if a boolean true is received on this channel, and low if a boolean false is received. Set the optional invert parameter to true to invert this logic.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Returns&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A unique index of this request in the internal request list.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerBool(   OISCommand command,&lt;br /&gt;
                                  boolCallback callback&lt;br /&gt;
                                )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will create a channel to receive the requested boolean data from the game. When data on this channel is received, Arduinos In Space will convert it to a boolean data type (true/false), and then pass it as an argument to the given callback function. The maximum number of request channels that can be created is specified by the numRequests argument to the ObjectsInSpace constructor. Attempts to request more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;command&amp;lt;/tt&amp;gt; The data command to request.&lt;br /&gt;
* &amp;lt;tt&amp;gt;callback&amp;lt;/tt&amp;gt; A callback function to handle the received data.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Returns&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A unique index of this request in the internal request list.&lt;br /&gt;
&lt;br /&gt;
===== registerInt() =====&lt;br /&gt;
&lt;br /&gt;
Register a request for numeric data.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerInt(  OISCommand command,&lt;br /&gt;
                                 intCallback callback&lt;br /&gt;
                               )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will create a channel to receive the requested integer data from the game. When data on this channel is received, Arduinos In Space will pass the data in integer format as an argument to the supplied callback function. The maximum number of request channels that can be created is specified by the numRequests argument to the ObjectsInSpace constructor. Attempts to request more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;command&amp;lt;/tt&amp;gt; The data command to request.&lt;br /&gt;
* &amp;lt;tt&amp;gt;callback&amp;lt;/tt&amp;gt; A callback function to handle the received data.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Return&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A unique index of this request in the internal request list.&lt;br /&gt;
&lt;br /&gt;
===== registerFloat() =====&lt;br /&gt;
&lt;br /&gt;
Register a request for floating point data.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerFloat(    OISCommand command,&lt;br /&gt;
                                   floatCallback callback&lt;br /&gt;
                                 )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will create a channel to receive the requested floating point data from the game. When data on this channel is received, Arduinos In Space will convert it to a floating point type (float), before passing it as an argument to the supplied callback function. The maximum number of request channels that can be created is specified by the numRequests argument to the ObjectsInSpace constructor. Attempts to request more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;commannd&amp;lt;/tt&amp;gt; The data command to request.&lt;br /&gt;
* &amp;lt;tt&amp;gt;callback&amp;lt;/tt&amp;gt; A callback function to handle the received data.&lt;br /&gt;
&lt;br /&gt;
==== Command channels ====&lt;br /&gt;
&lt;br /&gt;
These functions, executed during the synchronisation phase, request commands that we want to execute during the active phase.&lt;br /&gt;
&lt;br /&gt;
===== registerCommand() =====&lt;br /&gt;
&lt;br /&gt;
Register a client command.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerCommand( OISCommand command )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before the game will accept a given command, it must be registered. This function will register the command.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;command&amp;lt;/tt&amp;gt; The command to register.&lt;br /&gt;
&lt;br /&gt;
===== registerLatching() =====&lt;br /&gt;
&lt;br /&gt;
Register two commands bound to an input pin in latching mode.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerLatching (    uint8_t pin,&lt;br /&gt;
                                       OISCommand firstCommand,&lt;br /&gt;
                                       OISCommand secondCommand,&lt;br /&gt;
                                          uint8_t mode=INPUT&lt;br /&gt;
                                     )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arduinos In Space will poll the pin specified by &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt;. The first time it switches from inactive to active the first command will be sent. The second time it switches from inactive to active the second command will be sent, and so on. The maximum number of managed command pins are specified by the numCommandPins argument when constructing an ObjectsInSpace object. Attempts to register more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt; The pin to monitor. Arduinos in Space will set the mode, do &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; call &amp;lt;tt&amp;gt;pinMode()&amp;lt;/tt&amp;gt; on this pin.&lt;br /&gt;
* &amp;lt;tt&amp;gt;firstCommand&amp;lt;/tt&amp;gt; The command to send first active change.&lt;br /&gt;
* &amp;lt;tt&amp;gt;secondCommand&amp;lt;/tt&amp;gt; The command to send second active change.&lt;br /&gt;
* &amp;lt;tt&amp;gt;active&amp;lt;/tt&amp;gt; This sets the pin mode, as well as what readings will be considered active. When set to &amp;lt;tt&amp;gt;INPUT&amp;lt;/tt&amp;gt;, the pin is active when HIGH. When set to &amp;lt;tt&amp;gt;INPUT_PULLUP&amp;lt;/tt&amp;gt;, the pin is active when LOW.&lt;br /&gt;
&lt;br /&gt;
===== registerTrigger() =====&lt;br /&gt;
&lt;br /&gt;
Registers one or two commands bound to a single input pin in trigger mode.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerTrigger (    uint8_t pin,&lt;br /&gt;
                                      OISCommand activeCommand,&lt;br /&gt;
                                         uint8_t mode = INPUT&lt;br /&gt;
                                    )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arduinos In Space will poll the pin specified by &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt;, and whenever it changes from inactive to active will send the given client command. The maximum number of managed command pins are specified by the numCommandPins argument when constructing an ObjectsInSpace object. Attempts to register more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt; The pin to monitor. Arduinos in Space will set the mode, do &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; call &amp;lt;tt&amp;gt;pinMode()&amp;lt;/tt&amp;gt; on this pin.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activeCommand&amp;lt;/tt&amp;gt; The command to send when the pin goes active.&lt;br /&gt;
* &amp;lt;tt&amp;gt;mode&amp;lt;/tt&amp;gt; This sets the pin mode, as well as what readings will be considered active. When set to &amp;lt;tt&amp;gt;INPUT&amp;lt;/tt&amp;gt;, the pin is active when HIGH. When set to &amp;lt;tt&amp;gt;INPUT_PULLUP&amp;lt;/tt&amp;gt;, the pin is active when LOW.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerTrigger (    uint8_t pin,&lt;br /&gt;
                                      OISCommand activeCommand,&lt;br /&gt;
                                      OISCommand inactiveCommand,&lt;br /&gt;
                                         uint8_t mode = INPUT&lt;br /&gt;
                                    )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arduinos In Space will poll the pin specified by &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt;, sending activeCommand when the pin changes from inactive to active, and inactiveCommand when the pin changes from active to inactive. The maximum number of managed command pins are specified by the numCommandPins argument when constructing an ObjectsInSpace object. Attempts to register more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt; The pin to monitor. Arduinos in Space will set the mode, do &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; call &amp;lt;tt&amp;gt;pinMode()&amp;lt;/tt&amp;gt; on this pin.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activeCommand&amp;lt;/tt&amp;gt; The command to send when the pin goes active.&lt;br /&gt;
* &amp;lt;tt&amp;gt;inactiveCommand&amp;lt;/tt&amp;gt; The command to send when the pin goes inactive.&lt;br /&gt;
* &amp;lt;tt&amp;gt;mode&amp;lt;/tt&amp;gt; This sets the pin mode, as well as what readings will be considered active. When set to &amp;lt;tt&amp;gt;INPUT&amp;lt;/tt&amp;gt;, the pin is active when HIGH. When set to &amp;lt;tt&amp;gt;INPUT_PULLUP&amp;lt;/tt&amp;gt;, the pin is active when LOW.&lt;br /&gt;
&lt;br /&gt;
==== Active phase ====&lt;br /&gt;
&lt;br /&gt;
===== update() =====&lt;br /&gt;
&lt;br /&gt;
The main ObjectsInSpace loop.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;void ObjectsInSpace::update()&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Polls for new serial data, checks managed pin state, keeps the ObjectsInSpace object state consistent. This method should be run fairly frequently, ensure a call to it is in your &amp;lt;tt&amp;gt;loop()&amp;lt;/tt&amp;gt; function at least once.&lt;br /&gt;
&lt;br /&gt;
===== sendCommand() =====&lt;br /&gt;
&lt;br /&gt;
Send a command to the game.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;void ObjectsInSpace::sendCommand( OISCommand command )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The given command is sent to the game. Commands sent during the active phase should have been registered with &amp;lt;tt&amp;gt;registerCommannd()&amp;lt;/tt&amp;gt; during synchronisation. Arduinos in Space does not track registered commands, though, so will send any valid command passed to &amp;lt;tt&amp;gt;sendCommand()&amp;lt;/tt&amp;gt;. The game will (should?) ignore commands that were not requested.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;commannd&amp;lt;/tt&amp;gt; The command to send.&lt;br /&gt;
&lt;br /&gt;
===== sendDebug() =====&lt;br /&gt;
&lt;br /&gt;
Send a log message to the game.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;void ObjectsInSpace::sendDebug( char * message )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Send a text message to the game. This will be treated as a debug message, and appended to the game log file. Arduinos in Space uses this internally to send a banner message (&amp;quot;Arduinos in Space version x.x.x device successfully connected!&amp;quot;) on initial connectionn.&lt;br /&gt;
&lt;br /&gt;
== OISCommand ==&lt;br /&gt;
&lt;br /&gt;
A struct representing a possible Objects in Space channel.&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;pre&amp;gt;int channel&amp;lt;/pre&amp;gt; The channel ID. Only used for command channels.&lt;br /&gt;
* &amp;lt;pre&amp;gt;char const * name&amp;lt;/pre&amp;gt; The full text name of the channel.&lt;br /&gt;
&lt;br /&gt;
This struct contains information necessary to create a request or command channel. Each Arduinos in Space release includes OISCommand constants for all known requests and commands at time of release, with variable names identical to the &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt; field. It shouldn&amp;#039;t be necessary to create your own.&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_API&amp;diff=1058</id>
		<title>Arduinos in Space API</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_API&amp;diff=1058"/>
				<updated>2018-08-15T12:27:55Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ObjectsInSpace class ==&lt;br /&gt;
&lt;br /&gt;
This is the main interface for Arduinos In Space. A single ObjectsInSpace object manages all aspects of a serial connection. It provides an interface to send commands to the game, and can poll input pins to trigger those commannds. It also allows to request data from the game, and will pass received data to a specified output pin, or a callback function for more complex requests.&lt;br /&gt;
&lt;br /&gt;
=== Constructors ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;ObjectsInSpace( Stream &amp;amp; serial,&lt;br /&gt;
                     int numRequests,&lt;br /&gt;
                     int numCommandPins&lt;br /&gt;
              )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates an ObjectsInSpace object to manage a serial connection. Note that this constructor will &amp;#039;&amp;#039;not&amp;#039;&amp;#039; attempt to start the serial interface, it must be started separately with eg &amp;lt;tt&amp;gt;Serial.begin()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;serial&amp;lt;/tt&amp;gt; The serial instance this object will use to communicate with the game. Usually &amp;lt;tt&amp;gt;Serial&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;numRequests&amp;lt;/tt&amp;gt; The number of request channels to allocate. This is the maximum number of requests for data this object will support. It does &amp;#039;&amp;#039;not&amp;#039;&amp;#039; include command channels.&lt;br /&gt;
* &amp;lt;tt&amp;gt;numCommandPins&amp;lt;/tt&amp;gt; The number of &amp;#039;&amp;#039;managed&amp;#039;&amp;#039; input pins to allocate. This is the maximum number of commands channels with managed input pins (created via &amp;lt;tt&amp;gt;registerLatching()&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;registerTrigger()&amp;lt;/tt&amp;gt;) the object will support. Commands that will be send directly through &amp;lt;tt&amp;gt;sendCommand()&amp;lt;/tt&amp;gt; do not need to be included here.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;ObjectsInSpace( Stream &amp;amp; serial,&lt;br /&gt;
                     int numRequests&lt;br /&gt;
              )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this constructor is &amp;#039;&amp;#039;&amp;#039;deprecated&amp;#039;&amp;#039;&amp;#039;, and will be removed in a future release. Identical to the main constructor, but the created object will not be able to support any managed input pins.&lt;br /&gt;
&lt;br /&gt;
=== Member functions ===&lt;br /&gt;
&lt;br /&gt;
==== Handshaking phase ====&lt;br /&gt;
===== begin() =====&lt;br /&gt;
&lt;br /&gt;
Initialise the connection, and perform handshaking with the game.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;void ObjectsInSpace::begin()&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;begin()&amp;lt;/tt&amp;gt; function will periodically send a handshake request packet, and wait for the game to send a successful response. This is a blocking function - it won&amp;#039;t return until handshaking is successful and the game has moved to the Synchronisation phase of the connection.&lt;br /&gt;
&lt;br /&gt;
==== Synchronisation phase ====&lt;br /&gt;
===== activate() =====&lt;br /&gt;
&lt;br /&gt;
Start active phase&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;void ObjectsInSpace::activate()&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;activate()&amp;lt;/tt&amp;gt; function tells the game that we have completed synchronising commands and requests with the game, and are ready to move in to the active phase of the connection. The game will start sending live data and processing game commands we send.&lt;br /&gt;
&lt;br /&gt;
==== Request channels ====&lt;br /&gt;
&lt;br /&gt;
These functions, executed during the synchronisation phase, set up channels requesting data from the game.&lt;br /&gt;
&lt;br /&gt;
===== registerBool() =====&lt;br /&gt;
&lt;br /&gt;
Register a request for boolean data (true/false, 1/0, on/off).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerBool( OISCommand command,&lt;br /&gt;
                                         int pin,&lt;br /&gt;
                                        bool invert=false&lt;br /&gt;
                                )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will create a channel to receive the requested boolean data from the game. When data on this channel is received, Arduinos in Space will change the status of the given output pin to match the data received. Note that this function also sets the pin mode appropriately, there is no need for a separate &amp;lt;tt&amp;gt;pinMode()&amp;lt;/tt&amp;gt; call. The maximum number of request channels that can be created is specified by the numRequests argument to the ObjectsInSpace constructor. Attempts to request more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;command&amp;lt;/tt&amp;gt; The data command to request.&lt;br /&gt;
* &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt; A pin number to control.&lt;br /&gt;
* &amp;lt;tt&amp;gt;invert&amp;lt;/tt&amp;gt; By default, the output pin will be set high if a boolean true is received on this channel, and low if a boolean false is received. Set the optional invert parameter to true to invert this logic.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Returns&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A unique index of this request in the internal request list.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerBool(   OISCommand command,&lt;br /&gt;
                                  boolCallback callback&lt;br /&gt;
                                )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will create a channel to receive the requested boolean data from the game. When data on this channel is received, Arduinos In Space will convert it to a boolean data type (true/false), and then pass it as an argument to the given callback function. The maximum number of request channels that can be created is specified by the numRequests argument to the ObjectsInSpace constructor. Attempts to request more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;command&amp;lt;/tt&amp;gt; The data command to request.&lt;br /&gt;
* &amp;lt;tt&amp;gt;callback&amp;lt;/tt&amp;gt; A callback function to handle the received data.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Returns&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A unique index of this request in the internal request list.&lt;br /&gt;
&lt;br /&gt;
===== registerInt() =====&lt;br /&gt;
&lt;br /&gt;
Register a request for numeric data.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerInt(  OISCommand command,&lt;br /&gt;
                                 intCallback callback&lt;br /&gt;
                               )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will create a channel to receive the requested integer data from the game. When data on this channel is received, Arduinos In Space will pass the data in integer format as an argument to the supplied callback function. The maximum number of request channels that can be created is specified by the numRequests argument to the ObjectsInSpace constructor. Attempts to request more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;command&amp;lt;/tt&amp;gt; The data command to request.&lt;br /&gt;
* &amp;lt;tt&amp;gt;callback&amp;lt;/tt&amp;gt; A callback function to handle the received data.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Return&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A unique index of this request in the internal request list.&lt;br /&gt;
&lt;br /&gt;
===== registerFloat() =====&lt;br /&gt;
&lt;br /&gt;
Register a request for floating point data.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerFloat(    OISCommand command,&lt;br /&gt;
                                   floatCallback callback&lt;br /&gt;
                                 )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will create a channel to receive the requested floating point data from the game. When data on this channel is received, Arduinos In Space will convert it to a floating point type (float), before passing it as an argument to the supplied callback function. The maximum number of request channels that can be created is specified by the numRequests argument to the ObjectsInSpace constructor. Attempts to request more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;commannd&amp;lt;/tt&amp;gt; The data command to request.&lt;br /&gt;
* &amp;lt;tt&amp;gt;callback&amp;lt;/tt&amp;gt; A callback function to handle the received data.&lt;br /&gt;
&lt;br /&gt;
==== Command channels ====&lt;br /&gt;
&lt;br /&gt;
These functions, executed during the synchronisation phase, request commands that we want to execute during the active phase.&lt;br /&gt;
&lt;br /&gt;
===== registerCommand() =====&lt;br /&gt;
&lt;br /&gt;
Register a client command.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerCommand( OISCommand command )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before the game will accept a given command, it must be registered. This function will register the command.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;command&amp;lt;/tt&amp;gt; The command to register.&lt;br /&gt;
&lt;br /&gt;
===== registerLatching() =====&lt;br /&gt;
&lt;br /&gt;
Register two commands bound to an input pin in latching mode.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerLatching (    uint8_t pin,&lt;br /&gt;
                                       OISCommand firstCommand,&lt;br /&gt;
                                       OISCommand secondCommand,&lt;br /&gt;
                                          uint8_t mode=INPUT&lt;br /&gt;
                                     )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arduinos In Space will poll the pin specified by &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt;. The first time it switches from inactive to active the first command will be sent. The second time it switches from inactive to active the second command will be sent, and so on. The maximum number of managed command pins are specified by the numCommandPins argument when constructing an ObjectsInSpace object. Attempts to register more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt; The pin to monitor. Arduinos in Space will set the mode, do &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; call &amp;lt;tt&amp;gt;pinMode()&amp;lt;/tt&amp;gt; on this pin.&lt;br /&gt;
* &amp;lt;tt&amp;gt;firstCommand&amp;lt;/tt&amp;gt; The command to send first active change.&lt;br /&gt;
* &amp;lt;tt&amp;gt;secondCommand&amp;lt;/tt&amp;gt; The command to send second active change.&lt;br /&gt;
* &amp;lt;tt&amp;gt;active&amp;lt;/tt&amp;gt; This sets the pin mode, as well as what readings will be considered active. When set to &amp;lt;tt&amp;gt;INPUT&amp;lt;/tt&amp;gt;, the pin is active when HIGH. When set to &amp;lt;tt&amp;gt;INPUT_PULLUP&amp;lt;/tt&amp;gt;, the pin is active when LOW.&lt;br /&gt;
&lt;br /&gt;
===== registerTrigger() =====&lt;br /&gt;
&lt;br /&gt;
Registers one or two commands bound to a single input pin in trigger mode.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerTrigger (    uint8_t pin,&lt;br /&gt;
                                      OISCommand activeCommand,&lt;br /&gt;
                                         uint8_t mode = INPUT&lt;br /&gt;
                                    )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arduinos In Space will poll the pin specified by &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt;, and whenever it changes from inactive to active will send the given client command. The maximum number of managed command pins are specified by the numCommandPins argument when constructing an ObjectsInSpace object. Attempts to register more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt; The pin to monitor. Arduinos in Space will set the mode, do &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; call &amp;lt;tt&amp;gt;pinMode()&amp;lt;/tt&amp;gt; on this pin.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activeCommand&amp;lt;/tt&amp;gt; The command to send when the pin goes active.&lt;br /&gt;
* &amp;lt;tt&amp;gt;mode&amp;lt;/tt&amp;gt; This sets the pin mode, as well as what readings will be considered active. When set to &amp;lt;tt&amp;gt;INPUT&amp;lt;/tt&amp;gt;, the pin is active when HIGH. When set to &amp;lt;tt&amp;gt;INPUT_PULLUP&amp;lt;/tt&amp;gt;, the pin is active when LOW.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerTrigger (    uint8_t pin,&lt;br /&gt;
                                      OISCommand activeCommand,&lt;br /&gt;
                                      OISCommand inactiveCommand,&lt;br /&gt;
                                         uint8_t mode = INPUT&lt;br /&gt;
                                    )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arduinos In Space will poll the pin specified by &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt;, sending activeCommand when the pin changes from inactive to active, and inactiveCommand when the pin changes from active to inactive. The maximum number of managed command pins are specified by the numCommandPins argument when constructing an ObjectsInSpace object. Attempts to register more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt; The pin to monitor. Arduinos in Space will set the mode, do &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; call &amp;lt;tt&amp;gt;pinMode()&amp;lt;/tt&amp;gt; on this pin.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activeCommand&amp;lt;/tt&amp;gt; The command to send when the pin goes active.&lt;br /&gt;
* &amp;lt;tt&amp;gt;inactiveCommand&amp;lt;/tt&amp;gt; The command to send when the pin goes inactive.&lt;br /&gt;
* &amp;lt;tt&amp;gt;mode&amp;lt;/tt&amp;gt; This sets the pin mode, as well as what readings will be considered active. When set to &amp;lt;tt&amp;gt;INPUT&amp;lt;/tt&amp;gt;, the pin is active when HIGH. When set to &amp;lt;tt&amp;gt;INPUT_PULLUP&amp;lt;/tt&amp;gt;, the pin is active when LOW.&lt;br /&gt;
&lt;br /&gt;
==== Active phase ====&lt;br /&gt;
&lt;br /&gt;
===== update() =====&lt;br /&gt;
&lt;br /&gt;
The main ObjectsInSpace loop.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;void ObjectsInSpace::update()&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Polls for new serial data, checks managed pin state, keeps the ObjectsInSpace object state consistent. This method should be run fairly frequently, ensure a call to it is in your &amp;lt;tt&amp;gt;loop()&amp;lt;/tt&amp;gt; function at least once.&lt;br /&gt;
&lt;br /&gt;
===== sendCommand() =====&lt;br /&gt;
&lt;br /&gt;
Send a command to the game.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;void ObjectsInSpace::sendCommand( OISCommand command )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The given command is sent to the game. Commands sent during the active phase should have been registered with &amp;lt;tt&amp;gt;registerCommannd()&amp;lt;/tt&amp;gt; during synchronisation. Arduinos in Space does not track registered commands, though, so will send any valid command passed to &amp;lt;tt&amp;gt;sendCommand()&amp;lt;/tt&amp;gt;. The game will (should?) ignore commands that were not requested.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;commannd&amp;lt;/tt&amp;gt; The command to send.&lt;br /&gt;
&lt;br /&gt;
===== sendDebug() =====&lt;br /&gt;
&lt;br /&gt;
Send a log message to the game.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;void ObjectsInSpace::sendDebug( char * message )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Send a text message to the game. This will be treated as a debug message, and appended to the game log file. Arduinos in Space uses this internally to send a banner message (&amp;quot;Arduinos in Space version x.x.x device successfully connected!&amp;quot;) on initial connectionn.&lt;br /&gt;
&lt;br /&gt;
== OISCommand ==&lt;br /&gt;
&lt;br /&gt;
A struct representing a possible Objects in Space channel.&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;pre&amp;gt;int channel&amp;lt;/pre&amp;gt; The channel ID. Only used for command channels.&lt;br /&gt;
* &amp;lt;pre&amp;gt;char const * name&amp;lt;/pre&amp;gt; The full text name of the channel.&lt;br /&gt;
&lt;br /&gt;
This struct contains information necessary to create a request or command channel. Each Arduinos in Space release includes OISCommand constants for all known requests and commands at time of release, with variable names identical to the &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt; field. It shouldn&amp;#039;t be necessary to create your own.&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_API&amp;diff=1057</id>
		<title>Arduinos in Space API</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space_API&amp;diff=1057"/>
				<updated>2018-08-15T12:21:18Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: Created page, documentation for ObjectsInSpace class.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ObjectsInSpace class ==&lt;br /&gt;
&lt;br /&gt;
This is the main interface for Arduinos In Space. A single ObjectsInSpace object manages all aspects of a serial connection. It provides an interface to send commands to the game, and can poll input pins to trigger those commannds. It also allows to request data from the game, and will pass received data to a specified output pin, or a callback function for more complex requests.&lt;br /&gt;
&lt;br /&gt;
=== Constructors ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;ObjectsInSpace( Stream &amp;amp; serial,&lt;br /&gt;
                     int numRequests,&lt;br /&gt;
                     int numCommandPins&lt;br /&gt;
              )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates an ObjectsInSpace object to manage a serial connection. Note that this constructor will &amp;#039;&amp;#039;not&amp;#039;&amp;#039; attempt to start the serial interface, it must be started separately with eg &amp;lt;tt&amp;gt;Serial.begin()&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;serial&amp;lt;/tt&amp;gt; The serial instance this object will use to communicate with the game. Usually &amp;lt;tt&amp;gt;Serial&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;numRequests&amp;lt;/tt&amp;gt; The number of request channels to allocate. This is the maximum number of requests for data this object will support. It does &amp;#039;&amp;#039;not&amp;#039;&amp;#039; include command channels.&lt;br /&gt;
* &amp;lt;tt&amp;gt;numCommandPins&amp;lt;/tt&amp;gt; The number of &amp;#039;&amp;#039;managed&amp;#039;&amp;#039; input pins to allocate. This is the maximum number of commands channels with managed input pins (created via &amp;lt;tt&amp;gt;registerLatching()&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;registerTrigger()&amp;lt;/tt&amp;gt;) the object will support. Commands that will be send directly through &amp;lt;tt&amp;gt;sendCommand()&amp;lt;/tt&amp;gt; do not need to be included here.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;ObjectsInSpace( Stream &amp;amp; serial,&lt;br /&gt;
                     int numRequests&lt;br /&gt;
              )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this constructor is &amp;#039;&amp;#039;&amp;#039;deprecated&amp;#039;&amp;#039;&amp;#039;, and will be removed in a future release. Identical to the main constructor, but the created object will not be able to support any managed input pins.&lt;br /&gt;
&lt;br /&gt;
=== Member functions ===&lt;br /&gt;
&lt;br /&gt;
==== Handshaking phase ====&lt;br /&gt;
===== begin() =====&lt;br /&gt;
&lt;br /&gt;
Initialise the connection, and perform handshaking with the game.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;void ObjectsInSpace::begin()&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;begin()&amp;lt;/tt&amp;gt; function will periodically send a handshake request packet, and wait for the game to send a successful response. This is a blocking function - it won&amp;#039;t return until handshaking is successful and the game has moved to the Synchronisation phase of the connection.&lt;br /&gt;
&lt;br /&gt;
==== Synchronisation phase ====&lt;br /&gt;
===== activate() =====&lt;br /&gt;
&lt;br /&gt;
Start active phase&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;void ObjectsInSpace::activate()&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;activate()&amp;lt;/tt&amp;gt; function tells the game that we have completed synchronising commands and requests with the game, and are ready to move in to the active phase of the connection. The game will start sending live data and processing game commands we send.&lt;br /&gt;
&lt;br /&gt;
==== Request channels ====&lt;br /&gt;
&lt;br /&gt;
These functions, executed during the synchronisation phase, set up channels requesting data from the game.&lt;br /&gt;
&lt;br /&gt;
===== registerBool() =====&lt;br /&gt;
&lt;br /&gt;
Register a request for boolean data (true/false, 1/0, on/off).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerBool( OISCommand command,&lt;br /&gt;
                                         int pin,&lt;br /&gt;
                                        bool invert=false&lt;br /&gt;
                                )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will create a channel to receive the requested boolean data from the game. When data on this channel is received, Arduinos in Space will change the status of the given output pin to match the data received. Note that this function also sets the pin mode appropriately, there is no need for a separate &amp;lt;tt&amp;gt;pinMode()&amp;lt;/tt&amp;gt; call. The maximum number of request channels that can be created is specified by the numRequests argument to the ObjectsInSpace constructor. Attempts to request more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;command&amp;lt;/tt&amp;gt; The data command to request.&lt;br /&gt;
* &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt; A pin number to control.&lt;br /&gt;
* &amp;lt;tt&amp;gt;invert&amp;lt;/tt&amp;gt; By default, the output pin will be set high if a boolean true is received on this channel, and low if a boolean false is received. Set the optional invert parameter to true to invert this logic.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Returns&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A unique index of this request in the internal request list.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerBool(   OISCommand command,&lt;br /&gt;
                                  boolCallback callback&lt;br /&gt;
                                )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will create a channel to receive the requested boolean data from the game. When data on this channel is received, Arduinos In Space will convert it to a boolean data type (true/false), and then pass it as an argument to the given callback function. The maximum number of request channels that can be created is specified by the numRequests argument to the ObjectsInSpace constructor. Attempts to request more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;command&amp;lt;/tt&amp;gt; The data command to request.&lt;br /&gt;
* &amp;lt;tt&amp;gt;callback&amp;lt;/tt&amp;gt; A callback function to handle the received data.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Returns&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A unique index of this request in the internal request list.&lt;br /&gt;
&lt;br /&gt;
===== registerInt() =====&lt;br /&gt;
&lt;br /&gt;
Register a request for numeric data.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerInt(  OISCommand command,&lt;br /&gt;
                                 intCallback callback&lt;br /&gt;
                               )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will create a channel to receive the requested integer data from the game. When data on this channel is received, Arduinos In Space will pass the data in integer format as an argument to the supplied callback function. The maximum number of request channels that can be created is specified by the numRequests argument to the ObjectsInSpace constructor. Attempts to request more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;command&amp;lt;/tt&amp;gt; The data command to request.&lt;br /&gt;
* &amp;lt;tt&amp;gt;callback&amp;lt;/tt&amp;gt; A callback function to handle the received data.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Return&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A unique index of this request in the internal request list.&lt;br /&gt;
&lt;br /&gt;
===== registerFloat() =====&lt;br /&gt;
&lt;br /&gt;
Register a request for floating point data.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerFloat(    OISCommand command,&lt;br /&gt;
                                   floatCallback callback&lt;br /&gt;
                                 )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will create a channel to receive the requested floating point data from the game. When data on this channel is received, Arduinos In Space will convert it to a floating point type (float), before passing it as an argument to the supplied callback function. The maximum number of request channels that can be created is specified by the numRequests argument to the ObjectsInSpace constructor. Attempts to request more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;commannd&amp;lt;/tt&amp;gt; The data command to request.&lt;br /&gt;
* &amp;lt;tt&amp;gt;callback&amp;lt;/tt&amp;gt; A callback function to handle the received data.&lt;br /&gt;
&lt;br /&gt;
==== Command channels ====&lt;br /&gt;
&lt;br /&gt;
These functions, executed during the synchronisation phase, request commands that we want to execute during the active phase.&lt;br /&gt;
&lt;br /&gt;
===== registerCommand() =====&lt;br /&gt;
&lt;br /&gt;
Register a client command.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerCommand( OISCommand command )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before the game will accept a given command, it must be registered. This function will register the command.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;command&amp;lt;/tt&amp;gt; The command to register.&lt;br /&gt;
&lt;br /&gt;
===== registerLatching() =====&lt;br /&gt;
&lt;br /&gt;
Register two commands bound to an input pin in latching mode.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerLatching (    uint8_t pin,&lt;br /&gt;
                                       OISCommand firstCommand,&lt;br /&gt;
                                       OISCommand secondCommand,&lt;br /&gt;
                                          uint8_t mode=INPUT&lt;br /&gt;
                                     )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arduinos In Space will poll the pin specified by &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt;. The first time it switches from inactive to active the first command will be sent. The second time it switches from inactive to active the second command will be sent, and so on. The maximum number of managed command pins are specified by the numCommandPins argument when constructing an ObjectsInSpace object. Attempts to register more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt; The pin to monitor. Arduinos in Space will set the mode, do &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; call &amp;lt;tt&amp;gt;pinMode()&amp;lt;/tt&amp;gt; on this pin.&lt;br /&gt;
* &amp;lt;tt&amp;gt;firstCommand&amp;lt;/tt&amp;gt; The command to send first active change.&lt;br /&gt;
* &amp;lt;tt&amp;gt;secondCommand&amp;lt;/tt&amp;gt; The command to send second active change.&lt;br /&gt;
* &amp;lt;tt&amp;gt;active&amp;lt;/tt&amp;gt; This sets the pin mode, as well as what readings will be considered active. When set to &amp;lt;tt&amp;gt;INPUT&amp;lt;/tt&amp;gt;, the pin is active when HIGH. When set to &amp;lt;tt&amp;gt;INPUT_PULLUP&amp;lt;/tt&amp;gt;, the pin is active when LOW.&lt;br /&gt;
&lt;br /&gt;
===== registerTrigger() =====&lt;br /&gt;
&lt;br /&gt;
Registers one or two commands bound to a single input pin in trigger mode.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerTrigger (    uint8_t pin,&lt;br /&gt;
                                      OISCommand activeCommand,&lt;br /&gt;
                                         uint8_t mode = INPUT&lt;br /&gt;
                                    )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arduinos In Space will poll the pin specified by &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt;, and whenever it changes from inactive to active will send the given client command. The maximum number of managed command pins are specified by the numCommandPins argument when constructing an ObjectsInSpace object. Attempts to register more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt; The pin to monitor. Arduinos in Space will set the mode, do &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; call &amp;lt;tt&amp;gt;pinMode()&amp;lt;/tt&amp;gt; on this pin.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activeCommand&amp;lt;/tt&amp;gt; The command to send when the pin goes active.&lt;br /&gt;
* &amp;lt;tt&amp;gt;mode&amp;lt;/tt&amp;gt; This sets the pin mode, as well as what readings will be considered active. When set to &amp;lt;tt&amp;gt;INPUT&amp;lt;/tt&amp;gt;, the pin is active when HIGH. When set to &amp;lt;tt&amp;gt;INPUT_PULLUP&amp;lt;/tt&amp;gt;, the pin is active when LOW.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;int ObjectsInSpace::registerTrigger (    uint8_t pin,&lt;br /&gt;
                                      OISCommand activeCommand,&lt;br /&gt;
                                      OISCommand inactiveCommand,&lt;br /&gt;
                                         uint8_t mode = INPUT&lt;br /&gt;
                                    )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arduinos In Space will poll the pin specified by &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt;, sending activeCommand when the pin changes from inactive to active, and inactiveCommand when the pin changes from active to inactive. The maximum number of managed command pins are specified by the numCommandPins argument when constructing an ObjectsInSpace object. Attempts to register more than this limit will silently fail.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;pin&amp;lt;/tt&amp;gt; The pin to monitor. Arduinos in Space will set the mode, do &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; call &amp;lt;tt&amp;gt;pinMode()&amp;lt;/tt&amp;gt; on this pin.&lt;br /&gt;
* &amp;lt;tt&amp;gt;activeCommand&amp;lt;/tt&amp;gt; The command to send when the pin goes active.&lt;br /&gt;
* &amp;lt;tt&amp;gt;inactiveCommand&amp;lt;/tt&amp;gt; The command to send when the pin goes inactive.&lt;br /&gt;
* &amp;lt;tt&amp;gt;mode&amp;lt;/tt&amp;gt; This sets the pin mode, as well as what readings will be considered active. When set to &amp;lt;tt&amp;gt;INPUT&amp;lt;/tt&amp;gt;, the pin is active when HIGH. When set to &amp;lt;tt&amp;gt;INPUT_PULLUP&amp;lt;/tt&amp;gt;, the pin is active when LOW.&lt;br /&gt;
&lt;br /&gt;
==== Active phase ====&lt;br /&gt;
&lt;br /&gt;
===== update() =====&lt;br /&gt;
&lt;br /&gt;
The main ObjectsInSpace loop.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;void ObjectsInSpace::update()&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Polls for new serial data, checks managed pin state, keeps the ObjectsInSpace object state consistent. This method should be run fairly frequently, ensure a call to it is in your &amp;lt;tt&amp;gt;loop()&amp;lt;/tt&amp;gt; function at least once.&lt;br /&gt;
&lt;br /&gt;
===== sendCommand() =====&lt;br /&gt;
&lt;br /&gt;
Send a command to the game.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;void ObjectsInSpace::sendCommand( OISCommand command )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The given command is sent to the game. Commands sent during the active phase should have been registered with &amp;lt;tt&amp;gt;registerCommannd()&amp;lt;/tt&amp;gt; during synchronisation. Arduinos in Space does not track registered commands, though, so will send any valid command passed to &amp;lt;tt&amp;gt;sendCommand()&amp;lt;/tt&amp;gt;. The game will (should?) ignore commands that were not requested.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;tt&amp;gt;commannd&amp;lt;/tt&amp;gt; The command to send.&lt;br /&gt;
&lt;br /&gt;
===== sendDebug() =====&lt;br /&gt;
&lt;br /&gt;
Send a log message to the game.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;void ObjectsInSpace::sendDebug( char * message )&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Send a text message to the game. This will be treated as a debug message, and appended to the game log file. Arduinos in Space uses this internally to send a banner message (&amp;quot;Arduinos in Space version x.x.x device successfully connected!&amp;quot;) on initial connectionn.&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Serial_Commands&amp;diff=1006</id>
		<title>Serial Commands</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Serial_Commands&amp;diff=1006"/>
				<updated>2018-07-29T22:13:00Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Commands&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Almost all of these have not been tested for effect&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Piloting&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;STOP_MAIN_ENGINE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Turns off the main engine&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;BURN_MAIN_ENGINE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Turns on the main engine&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TOGGLE_MAIN_ENGINE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Toggles the state of the main engine&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ENGAGE_COURSE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Engages the Auto pilot&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;FIRE_RCS_CW&amp;lt;/code&amp;gt;&lt;br /&gt;
|Starts rotating the ship clockwise&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;FULL_STOP&amp;lt;/code&amp;gt;&lt;br /&gt;
|Engages the Auto pilot to stop the ship&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;STOP_RCS&amp;lt;/code&amp;gt;&lt;br /&gt;
|Stops the ships rotation&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;FIRE_RCS_CCW&amp;lt;/code&amp;gt;&lt;br /&gt;
|Starts Rotating the ship counter-clockwise&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;UNDOCK&amp;lt;/code&amp;gt;&lt;br /&gt;
|Undocks the ship&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;CANCEL_AUTOPILOT&amp;lt;/code&amp;gt;&lt;br /&gt;
|Turns off the Auto Pilot&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ROTATE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PAY_FOR_JUMPGATE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ACTIVATE_JUMPGATE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_SPIN_UP_JUMP_DRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_BEGIN_JUMP&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAIN_DRIVE_POWER_DECREASE&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Sets main drive power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAIN_DRIVE_POWER_INCREASE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Nav&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PLOT_COURSE&amp;lt;/code&amp;gt;&lt;br /&gt;
|plots a course to the cursor on the nav console&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;REMOVE_LAST_WAYPOINT&amp;lt;/code&amp;gt;&lt;br /&gt;
|Removes the last point plotted on a course(maybe?)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;CLEAR_COURSE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Removes all plotted waypoints&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_MOVE_RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;6&amp;quot;|Moves the map&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_MOVE_LEFT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_MOVE_DOWN&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_MOVE_UP&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_ZOOM_OUT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_ZOOM_IN&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_CENTER&amp;lt;/code&amp;gt;&lt;br /&gt;
|Centers the map on the ship&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TOGGLE_MAP_MODE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Switches between Cluster and local view&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_CALCULATE_JUMP_SOLUTION&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_SET_JUMP_DESTINATION&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Weapons&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE1&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;5&amp;quot;|Selects a weapon tube&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE2&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE3&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE4&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE5&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;DESELECT_TUBE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Removes weapon tube selection&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Selects a weapon tube;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;POWER_DOWN_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|Powers down a weapon&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SPIN_UP_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|Starts readying a tube to fire&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SET_WEAPON_TARGET&amp;lt;/code&amp;gt;&lt;br /&gt;
|Sets the Weapon target(Info needs update)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;FIRE_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|Fires selected weapon&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ARM_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|Prepares a weapon to fire&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;UNLINK_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;FIRE_CM&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;DISABLE_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;EMCON_OFF&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Sets EMCON state&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;EMCON_ON&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TOGGLE_EMCON&amp;lt;/code&amp;gt;&lt;br /&gt;
|Toggles EMCON state&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ENG_DISCONNECT_CURRENT_MODULE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_CURRENT_MODULE_EMCON&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SCRAM_REACTOR&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_DISCHARGE_JUMP_DRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_CURRENT_MODULE_POWER&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TOGGLE_REACTOR&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;POWER_UP_REACTOR&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_HELM&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls helm power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_HELM&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_HELM&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_RCS&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls RCS power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_RCS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_RCS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_MAINDRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls main drive power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_MAINDRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_MAINDRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_COMMS&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls comms system power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_COMMS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_COMMS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_WEAP&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls weapons system power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_WEAP&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_WEAP&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_JUMPDRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls jump drive power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_JUMPDRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_JUMPDRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_BATT1&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls power to first battery&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_BATT1&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_BATT1&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_BATT2&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls power to second battery&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_BATT2&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_BATT2&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_BATT3&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls power to third battery&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_BATT3&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_BATT3&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_NAVCOM&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls power to navcom system&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_NAVCOM&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_NAVCOM&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_SENS&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls power to sensor system&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_SENS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_SENS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TURN_ON_SHIP&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TURN_OFF_SHIP&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_SELECT_MODULE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Comms&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TURN_OFF_IFF&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Turn Identify Friend or Foe signal off or on.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TURN_ON_IFF&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|COMMUNICATE_WITH_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|REQUEST_UNDOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|REQUEST_DOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|COMMS_TURN_ON_AUTO&lt;br /&gt;
|-&lt;br /&gt;
|COMMS_SYNC&lt;br /&gt;
|-&lt;br /&gt;
|COMMS_TURN_OFF_AUTO&lt;br /&gt;
|-&lt;br /&gt;
|TURN_OFF_SOS&lt;br /&gt;
|Turn off distress beacon.&lt;br /&gt;
|-&lt;br /&gt;
|TURN_ON_SOS&lt;br /&gt;
|Turn on distress beacon.&lt;br /&gt;
|-&lt;br /&gt;
!Colspan=&amp;quot;2&amp;quot;|Sensors&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SELECT_UP&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SELECT_DOWN&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SELECT_LEFT&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SELECT_RIGHT&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SET_NAV_AND_SENSOR_LINKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SELECT_TAB&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SET_HISTORY_LOCKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_UNSET_NAV_AND_SENSOR_LINKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SET_AUTO&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_UNSET_HISTORY_LOCKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_UNSET_AUTO&lt;br /&gt;
|-&lt;br /&gt;
!Colspan=&amp;quot;2&amp;quot;|Player movement&lt;br /&gt;
|-&lt;br /&gt;
|TIME_SLOWER&lt;br /&gt;
|-&lt;br /&gt;
|TIME_FASTER&lt;br /&gt;
|-&lt;br /&gt;
|ROOM_RIGHT&lt;br /&gt;
|-&lt;br /&gt;
|ROOM_LEFT&lt;br /&gt;
|-&lt;br /&gt;
|LEAVE_SHIP&lt;br /&gt;
|-&lt;br /&gt;
!Colspan=&amp;quot;2&amp;quot;|Mic&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_TO_STANDARD_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|BREAK_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_TO_POLAR_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_TO_HIGH_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|RESCIND_UNDOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|RESCIND_DOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|PAY_DOCKED_STATION&lt;br /&gt;
|-&lt;br /&gt;
|ENABLE_AUTO_REPAIR&lt;br /&gt;
|-&lt;br /&gt;
|DISABLE_AUTO_REPAIR&lt;br /&gt;
|-&lt;br /&gt;
|MAP_CLICK&lt;br /&gt;
|-&lt;br /&gt;
|ENG_OPEN_CURRENT_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|ENG_CONNECT_CURRENT_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|ENG_REPAIR_CURRENT_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_CLOSE_CURRENT_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_SELECT_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_SELECT_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|ENG_UNMOUNT_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_MOUNT_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_TOGGLE_SCREW&lt;br /&gt;
|-&lt;br /&gt;
|ENG_DESTROY_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|HELM_SET_ATAC_MODE&lt;br /&gt;
|not sure what ATAC is&lt;br /&gt;
|-&lt;br /&gt;
|ENG_TOGGLE_SHIELD&lt;br /&gt;
|-&lt;br /&gt;
|ENABLE_LADAR&lt;br /&gt;
|-&lt;br /&gt;
|HELM_UNSET_ATAC_MODE&lt;br /&gt;
|-&lt;br /&gt;
|TOGGLE_LADAR&lt;br /&gt;
|-&lt;br /&gt;
|DISABLE_LADAR&lt;br /&gt;
|-&lt;br /&gt;
|PWR_POWER_DECREASE&lt;br /&gt;
|-&lt;br /&gt;
|PWR_POWER_INCREASE&lt;br /&gt;
|-&lt;br /&gt;
|DEACTIVATE_PDS&lt;br /&gt;
|-&lt;br /&gt;
|ACTIVATE_PDS&lt;br /&gt;
|-&lt;br /&gt;
|TOGGLE_PDS&lt;br /&gt;
|-&lt;br /&gt;
|SHIP_CARGO_DOWN&lt;br /&gt;
|-&lt;br /&gt;
|JETTISON_CARGO&lt;br /&gt;
|-&lt;br /&gt;
|SHIP_CARGO_UP&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_CARGO_DOWN&lt;br /&gt;
|-&lt;br /&gt;
|JETTISON_ALL&lt;br /&gt;
|-&lt;br /&gt;
|TRANSFER_CARGO_FROM_MOORED&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_CARGO_UP&lt;br /&gt;
|-&lt;br /&gt;
|REPAIR_HULL_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|TRANSFER_CARGO_FROM_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|REARM_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|REPAIR_MODULES_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|TUTORIAL_JUMP&lt;br /&gt;
|-&lt;br /&gt;
|BUY_CM_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_PERFORM&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_TOMAX&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_MENU&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_CANCEL&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_TAKELOAN&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_GETLICENSE&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_TAKECONTRACT&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_REPAYLOAN&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_TOMENU&lt;br /&gt;
|-&lt;br /&gt;
|VIEW_WIRE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_BUY_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_REPAIR&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_UPGRADE_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_SELL_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_MODULETRANSACTION&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANCELMODULE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_SELLARMAMENT&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_BUYARMAMENT&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_WRECK_UNLOCK_CARGO&lt;br /&gt;
|-&lt;br /&gt;
|BUY_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|SET_VIEW_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_WRECK_DOWNLOAD_DATA&lt;br /&gt;
|-&lt;br /&gt;
|TAKE_PASSENGER&lt;br /&gt;
|-&lt;br /&gt;
|BOARD_BROKER_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|PREV_TRACK&lt;br /&gt;
|Play the previous track from music player.&lt;br /&gt;
|-&lt;br /&gt;
|NEXT_TRACK&lt;br /&gt;
|Play the next track from music player.&lt;br /&gt;
|-&lt;br /&gt;
|RESUME_TRACK&lt;br /&gt;
|Resume track from the music player.&lt;br /&gt;
|-&lt;br /&gt;
|PAUSE_TRACK&lt;br /&gt;
|Pause track from the music player.&lt;br /&gt;
|-&lt;br /&gt;
|QUIT_TO_MENU&lt;br /&gt;
|-&lt;br /&gt;
|TAKE_BOUNTY&lt;br /&gt;
|-&lt;br /&gt;
|QUIT_TO_OS&lt;br /&gt;
|-&lt;br /&gt;
|HACK&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:HardwareInterfacing]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Serial_Commands&amp;diff=1005</id>
		<title>Serial Commands</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Serial_Commands&amp;diff=1005"/>
				<updated>2018-07-29T22:10:19Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Commands&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Almost all of these have not been tested for effect&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Piloting&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;STOP_MAIN_ENGINE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Turns off the main engine&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;BURN_MAIN_ENGINE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Turns on the main engine&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TOGGLE_MAIN_ENGINE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Toggles the state of the main engine&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ENGAGE_COURSE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Engages the Auto pilot&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;FIRE_RCS_CW&amp;lt;/code&amp;gt;&lt;br /&gt;
|Starts rotating the ship clockwise&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;FULL_STOP&amp;lt;/code&amp;gt;&lt;br /&gt;
|Engages the Auto pilot to stop the ship&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;STOP_RCS&amp;lt;/code&amp;gt;&lt;br /&gt;
|Stops the ships rotation&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;codeFIRE_RCS_CCW&amp;lt;/code&amp;gt;&lt;br /&gt;
|Starts Rotating the ship counter-clockwise&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;UNDOCK&amp;lt;/code&amp;gt;&lt;br /&gt;
|Undocks the ship&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;CANCEL_AUTOPILOT&amp;lt;/code&amp;gt;&lt;br /&gt;
|Turns off the Auto Pilot&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ROTATE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PAY_FOR_JUMPGATE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ACTIVATE_JUMPGATE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_SPIN_UP_JUMP_DRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_BEGIN_JUMP&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAIN_DRIVE_POWER_DECREASE&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Sets main drive power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAIN_DRIVE_POWER_INCREASE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Nav&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PLOT_COURSE&amp;lt;/code&amp;gt;&lt;br /&gt;
|plots a course to the cursor on the nav console&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;REMOVE_LAST_WAYPOINT&amp;lt;/code&amp;gt;&lt;br /&gt;
|Removes the last point plotted on a course(maybe?)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;CLEAR_COURSE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Removes all plotted waypoints&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_MOVE_RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;6&amp;quot;|Moves the map&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_MOVE_LEFT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_MOVE_DOWN&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_MOVE_UP&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_ZOOM_OUT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_ZOOM_IN&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_CENTER&amp;lt;/code&amp;gt;&lt;br /&gt;
|Centers the map on the ship&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TOGGLE_MAP_MODE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Switches between Cluster and local view&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_CALCULATE_JUMP_SOLUTION&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_SET_JUMP_DESTINATION&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Weapons&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE1&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;5&amp;quot;|Selects a weapon tube&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE2&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE3&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE4&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE5&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;DESELECT_TUBE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Removes weapon tube selection&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Selects a weapon tube;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;POWER_DOWN_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|Powers down a weapon&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SPIN_UP_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|Starts readying a tube to fire&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SET_WEAPON_TARGET&amp;lt;/code&amp;gt;&lt;br /&gt;
|Sets the Weapon target(Info needs update)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;FIRE_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|Fires selected weapon&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ARM_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|Prepares a weapon to fire&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;UNLINK_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;FIRE_CM&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;DISABLE_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;EMCON_OFF&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Sets EMCON state&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;EMCON_ON&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TOGGLE_EMCON&amp;lt;/code&amp;gt;&lt;br /&gt;
|Toggles EMCON state&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ENG_DISCONNECT_CURRENT_MODULE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_CURRENT_MODULE_EMCON&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SCRAM_REACTOR&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_DISCHARGE_JUMP_DRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_CURRENT_MODULE_POWER&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TOGGLE_REACTOR&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;POWER_UP_REACTOR&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_HELM&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls helm power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_HELM&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;codePWR_TOGGLE_HELM&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_RCS&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls RCS power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_RCS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_RCS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_MAINDRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls main drive power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_MAINDRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_MAINDRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_COMMS&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls comms system power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_COMMS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_COMMS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_WEAP&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls weapons system power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_WEAP&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_WEAP&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_JUMPDRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls jump drive power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_JUMPDRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_JUMPDRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_BATT1&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls power to first battery&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_BATT1&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_BATT1&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_BATT2&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls power to second battery&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_BATT2&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_BATT2&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_BATT3&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Controls power to third battery&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_BATT3&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_BATT3&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_NAVCOM&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowscount=&amp;quot;3&amp;quot;|Controls power to navcom system&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_NAVCOM&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_NAVCOM&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_CONNECT_SENS&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowcount=&amp;quot;3&amp;quot;|Controls power to sensor system&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_DISCONNECT_SENS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_SENS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TURN_ON_SHIP&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TURN_OFF_SHIP&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_SELECT_MODULE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Comms&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TURN_OFF_IFF&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Turn Identify Friend or Foe signal off or on.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TURN_ON_IFF&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|COMMUNICATE_WITH_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|REQUEST_UNDOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|REQUEST_DOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|COMMS_TURN_ON_AUTO&lt;br /&gt;
|-&lt;br /&gt;
|COMMS_SYNC&lt;br /&gt;
|-&lt;br /&gt;
|COMMS_TURN_OFF_AUTO&lt;br /&gt;
|-&lt;br /&gt;
|TURN_OFF_SOS&lt;br /&gt;
|Turn off distress beacon.&lt;br /&gt;
|-&lt;br /&gt;
|TURN_ON_SOS&lt;br /&gt;
|Turn on distress beacon.&lt;br /&gt;
|-&lt;br /&gt;
!Colspan=&amp;quot;2&amp;quot;|Sensors&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SELECT_UP&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SELECT_DOWN&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SELECT_LEFT&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SELECT_RIGHT&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SET_NAV_AND_SENSOR_LINKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SELECT_TAB&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SET_HISTORY_LOCKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_UNSET_NAV_AND_SENSOR_LINKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SET_AUTO&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_UNSET_HISTORY_LOCKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_UNSET_AUTO&lt;br /&gt;
|-&lt;br /&gt;
!Colspan=&amp;quot;2&amp;quot;|Player movement&lt;br /&gt;
|-&lt;br /&gt;
|TIME_SLOWER&lt;br /&gt;
|-&lt;br /&gt;
|TIME_FASTER&lt;br /&gt;
|-&lt;br /&gt;
|ROOM_RIGHT&lt;br /&gt;
|-&lt;br /&gt;
|ROOM_LEFT&lt;br /&gt;
|-&lt;br /&gt;
|LEAVE_SHIP&lt;br /&gt;
|-&lt;br /&gt;
!Colspan=&amp;quot;2&amp;quot;|Mic&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_TO_STANDARD_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|BREAK_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_TO_POLAR_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_TO_HIGH_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|RESCIND_UNDOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|RESCIND_DOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|PAY_DOCKED_STATION&lt;br /&gt;
|-&lt;br /&gt;
|ENABLE_AUTO_REPAIR&lt;br /&gt;
|-&lt;br /&gt;
|DISABLE_AUTO_REPAIR&lt;br /&gt;
|-&lt;br /&gt;
|MAP_CLICK&lt;br /&gt;
|-&lt;br /&gt;
|ENG_OPEN_CURRENT_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|ENG_CONNECT_CURRENT_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|ENG_REPAIR_CURRENT_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_CLOSE_CURRENT_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_SELECT_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_SELECT_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|ENG_UNMOUNT_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_MOUNT_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_TOGGLE_SCREW&lt;br /&gt;
|-&lt;br /&gt;
|ENG_DESTROY_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|HELM_SET_ATAC_MODE&lt;br /&gt;
|not sure what ATAC is&lt;br /&gt;
|-&lt;br /&gt;
|ENG_TOGGLE_SHIELD&lt;br /&gt;
|-&lt;br /&gt;
|ENABLE_LADAR&lt;br /&gt;
|-&lt;br /&gt;
|HELM_UNSET_ATAC_MODE&lt;br /&gt;
|-&lt;br /&gt;
|TOGGLE_LADAR&lt;br /&gt;
|-&lt;br /&gt;
|DISABLE_LADAR&lt;br /&gt;
|-&lt;br /&gt;
|PWR_POWER_DECREASE&lt;br /&gt;
|-&lt;br /&gt;
|PWR_POWER_INCREASE&lt;br /&gt;
|-&lt;br /&gt;
|DEACTIVATE_PDS&lt;br /&gt;
|-&lt;br /&gt;
|ACTIVATE_PDS&lt;br /&gt;
|-&lt;br /&gt;
|TOGGLE_PDS&lt;br /&gt;
|-&lt;br /&gt;
|SHIP_CARGO_DOWN&lt;br /&gt;
|-&lt;br /&gt;
|JETTISON_CARGO&lt;br /&gt;
|-&lt;br /&gt;
|SHIP_CARGO_UP&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_CARGO_DOWN&lt;br /&gt;
|-&lt;br /&gt;
|JETTISON_ALL&lt;br /&gt;
|-&lt;br /&gt;
|TRANSFER_CARGO_FROM_MOORED&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_CARGO_UP&lt;br /&gt;
|-&lt;br /&gt;
|REPAIR_HULL_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|TRANSFER_CARGO_FROM_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|REARM_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|REPAIR_MODULES_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|TUTORIAL_JUMP&lt;br /&gt;
|-&lt;br /&gt;
|BUY_CM_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_PERFORM&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_TOMAX&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_MENU&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_CANCEL&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_TAKELOAN&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_GETLICENSE&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_TAKECONTRACT&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_REPAYLOAN&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_TOMENU&lt;br /&gt;
|-&lt;br /&gt;
|VIEW_WIRE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_BUY_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_REPAIR&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_UPGRADE_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_SELL_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_MODULETRANSACTION&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANCELMODULE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_SELLARMAMENT&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_BUYARMAMENT&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_WRECK_UNLOCK_CARGO&lt;br /&gt;
|-&lt;br /&gt;
|BUY_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|SET_VIEW_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_WRECK_DOWNLOAD_DATA&lt;br /&gt;
|-&lt;br /&gt;
|TAKE_PASSENGER&lt;br /&gt;
|-&lt;br /&gt;
|BOARD_BROKER_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|PREV_TRACK&lt;br /&gt;
|Play the previous track from music player.&lt;br /&gt;
|-&lt;br /&gt;
|NEXT_TRACK&lt;br /&gt;
|Play the next track from music player.&lt;br /&gt;
|-&lt;br /&gt;
|RESUME_TRACK&lt;br /&gt;
|Resume track from the music player.&lt;br /&gt;
|-&lt;br /&gt;
|PAUSE_TRACK&lt;br /&gt;
|Pause track from the music player.&lt;br /&gt;
|-&lt;br /&gt;
|QUIT_TO_MENU&lt;br /&gt;
|-&lt;br /&gt;
|TAKE_BOUNTY&lt;br /&gt;
|-&lt;br /&gt;
|QUIT_TO_OS&lt;br /&gt;
|-&lt;br /&gt;
|HACK&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:HardwareInterfacing]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Serial_Requests&amp;diff=977</id>
		<title>Serial Requests</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Serial_Requests&amp;diff=977"/>
				<updated>2018-07-25T22:00:45Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Numeric Requests ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Numeric Requests&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;POWER_LEVEL&amp;lt;/code&amp;gt;&lt;br /&gt;
|An &amp;#039;&amp;#039;&amp;#039;integer value&amp;#039;&amp;#039;&amp;#039; showing available power as a percentage of total capacity. Note that the game currently doesn&amp;#039;t fill all batteries to capacity, so this won&amp;#039;t report higher than 99.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;POWER_DRAIN&amp;lt;/code&amp;gt;&lt;br /&gt;
|A &amp;#039;&amp;#039;&amp;#039;float value&amp;#039;&amp;#039;&amp;#039; indicating net power drain in mw. Values &amp;gt; 0 indicate net power gain, &amp;lt; 0 is a net power loss. For example, the default Ceres starter ship has a 5.00mw reactor, and idles at -1.20mw power draw. &amp;lt;code&amp;gt;POWER_DRAIN&amp;lt;/code&amp;gt; usually report 3.80.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;POWER_DRAW_PERCENT&amp;lt;/code&amp;gt;&lt;br /&gt;
|An &amp;#039;&amp;#039;&amp;#039;integer value&amp;#039;&amp;#039;&amp;#039;. Usage is unknown. Seems to reflect current power draw as a percentage of total possible draw.&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Movement&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;DESIRED_DIRECTION&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MOTION_ANGLE&amp;lt;/code&amp;gt;&lt;br /&gt;
|The angle the ship is moving&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;DIRECTION&amp;lt;/code&amp;gt;&lt;br /&gt;
|The angle the ship is facing &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;CURRENT_SPEED&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;CURRENT_SPEED_PERCENT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Nav&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;CURRENT_DISTANCE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ASTEROID_DENSITY&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;NEBULA_DENSITY&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Weapons&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TUBE_SELECTED&amp;lt;/code&amp;gt;&lt;br /&gt;
|Which weapon tube is selected&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;CURRENT_TUBE_SPIN_UP_PERCENT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Misc&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PRESSURE_EXTERIOR&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PRESSURE_INTERIOR&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PRESSURE_AIRLOCK&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;CURRENT_TEMPERATURE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;AMOUNT_OWED_TO_DOCKED&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;AMOUNT_OWED_VIA_COMMS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;AUTO_REPAIR_PERCENT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ENG_CURRENT_REPAIR_PERCENT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ENG_CURRENT_SPARE_PARTS&amp;lt;/code&amp;gt;&lt;br /&gt;
|Might not be in the game&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ENG_MAX_SPARE_PARTS&amp;lt;/code&amp;gt;&lt;br /&gt;
|Might not be in the game&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_SOLUTION&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAIN_DRIVE_POWER_LEVEL&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;HULL_TEMPERATURE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;UNREAD_EMAILS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;READ_EMAILS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PLAYER_CREDITS&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SOLAR_RADIATION_PERCENT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;GRAPPLE_ARM_PERCENTAGE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;HACK_PERCENTAGE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PENDING_EMAILS&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Boolean Requests ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Boolean Requests&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Docking&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;NOT_DOCKED&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;IS_DOCKED_OR_DOCKING&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;IS_DOCKED&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|IS_DOCKING&lt;br /&gt;
|-&lt;br /&gt;
|IS_FULLY_DOCKED&lt;br /&gt;
|-&lt;br /&gt;
|IS_UNDOCKING&lt;br /&gt;
|-&lt;br /&gt;
|NOT_DOCKING&lt;br /&gt;
|-&lt;br /&gt;
|NOT_UNDOCKING&lt;br /&gt;
|-&lt;br /&gt;
|CAN_OPEN_AIRLOCK&lt;br /&gt;
|-&lt;br /&gt;
|HAS_DOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|NEEDS_DOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|HAS_UNDOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|NEEDS_UNDOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|NOT_DOCKED_OR_MULTIPLAYER&lt;br /&gt;
|-&lt;br /&gt;
|NOT_DOCKED_OR_MULTIPLAYER_OR_TUTORIAL&lt;br /&gt;
|-&lt;br /&gt;
|CAN_GET_UNDOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|CANNOT_GET_UNDOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|DOCKED_BUT_CANNOT_UNDOCK&lt;br /&gt;
|-&lt;br /&gt;
|OWES_MONEY_TO_DOCKED_STATION_AND_CANNOT_PAY&lt;br /&gt;
|-&lt;br /&gt;
|OWES_MONEY_TO_DOCKED_STATION_AND_CAN_PAY&lt;br /&gt;
|-&lt;br /&gt;
|IS_DOCKED_WITH_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|ANY_AIRLOCK_OPEN&lt;br /&gt;
|-&lt;br /&gt;
|ALL_AIRLOCKS_SEALED&lt;br /&gt;
|-&lt;br /&gt;
|AIRLOCKS_CLOSED_BUT_NEEDS_UNDOCK_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|CAN_UNDOCK&lt;br /&gt;
|-&lt;br /&gt;
|OWES_MONEY_TO_DOCKED_STATION&lt;br /&gt;
|-&lt;br /&gt;
|IS_DOCKED_WITH_STATION&lt;br /&gt;
|-&lt;br /&gt;
|IS_DOCKED_WITH_JUMPGATE&lt;br /&gt;
|-&lt;br /&gt;
|NEED_TO_PAY_FOR_JUMPGATE&lt;br /&gt;
|-&lt;br /&gt;
|CAN_ACTIVATE_JUMPGATE&lt;br /&gt;
|-&lt;br /&gt;
|NOT_DOCKED_WITH_STATION&lt;br /&gt;
|-&lt;br /&gt;
|DOCKED_WITH_JUMPGATE&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Nav&lt;br /&gt;
|-&lt;br /&gt;
|CLUSTER_MODE&lt;br /&gt;
|-&lt;br /&gt;
|NAV_TARGET_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|HAS_SELECTED_OBJECT&lt;br /&gt;
|-&lt;br /&gt;
|HAS_SELECTED_DIRECTION &lt;br /&gt;
|True when you are pointing in the direction you are moving (not always correct)&lt;br /&gt;
|-&lt;br /&gt;
|HAS_COURSE_PLOTTED&lt;br /&gt;
|-&lt;br /&gt;
|COURSE_PLOTTED_NOT_ENGAGED&lt;br /&gt;
|-&lt;br /&gt;
|MAP_LOCKED_TO_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|MAP_IN_SECTOR_MODE&lt;br /&gt;
|-&lt;br /&gt;
|HAS_SELECTED_DESTINATION&lt;br /&gt;
|-&lt;br /&gt;
|VALID_TRAVEL_TARGET_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|CAN_ADD_WAYPOINT&lt;br /&gt;
|-&lt;br /&gt;
|IS_IN_FREE_SPACE &lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Piloting&lt;br /&gt;
|-&lt;br /&gt;
|CAN_COME_TO_FULL_STOP&lt;br /&gt;
|-&lt;br /&gt;
|CAN_ROTATE &lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|IS_MOVING&lt;br /&gt;
|-&lt;br /&gt;
|IS_STATIONARY&lt;br /&gt;
|-&lt;br /&gt;
|MAIN_ENGINE_BURNING&lt;br /&gt;
|-&lt;br /&gt;
|MAIN_DRIVE_FUNCTIONAL&lt;br /&gt;
|-&lt;br /&gt;
|AUTO_PILOT_ENGAGED&lt;br /&gt;
|-&lt;br /&gt;
|AUTO_PILOT_NOT_ENGAGED&lt;br /&gt;
|-&lt;br /&gt;
|RCS_BURNING&lt;br /&gt;
|-&lt;br /&gt;
|RCS_BURNING_CW&lt;br /&gt;
|-&lt;br /&gt;
|RCS_BURNING_CCW&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Jump Drive&lt;br /&gt;
|-&lt;br /&gt;
|JMP_CAN_SET_JUMP_DESTINATION&lt;br /&gt;
|-&lt;br /&gt;
|JMP_CAN_SPIN_UP_JUMP_DRIVE&lt;br /&gt;
|-&lt;br /&gt;
|JMP_CAN_CALC_JUMP&lt;br /&gt;
|-&lt;br /&gt;
|JMP_CAN_JUMP&lt;br /&gt;
|-&lt;br /&gt;
|JMP_CAN_DISCHARGE_JUMP_DRIVE&lt;br /&gt;
|-&lt;br /&gt;
|JMP_HAS_JUMP_DRIVE&lt;br /&gt;
|-&lt;br /&gt;
|JMP_IS_SPINNING_UP&lt;br /&gt;
|-&lt;br /&gt;
|JMP_IS_CALCULATING_JUMP&lt;br /&gt;
|-&lt;br /&gt;
|JMP_IS_SPUN_UP&lt;br /&gt;
|-&lt;br /&gt;
|JMP_IS_CALCULATED&lt;br /&gt;
|-&lt;br /&gt;
|JUMPDRIVE_ACTIVE&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Alerts&lt;br /&gt;
|-&lt;br /&gt;
|PWR_LOW_POWER_WARNING&lt;br /&gt;
|-&lt;br /&gt;
|PCE_ALARM&lt;br /&gt;
|-&lt;br /&gt;
|STATUS_WARNING&lt;br /&gt;
|-&lt;br /&gt;
|STATUS_DANGER&lt;br /&gt;
|-&lt;br /&gt;
|STATUS_NOMINAL&lt;br /&gt;
|-&lt;br /&gt;
|IN_ASTEROID_FIELD&lt;br /&gt;
|-&lt;br /&gt;
|IN_NEBULA&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Weapons&lt;br /&gt;
|-&lt;br /&gt;
|CM_EXISTS&lt;br /&gt;
|-&lt;br /&gt;
|CM_CANLAUNCH&lt;br /&gt;
|-&lt;br /&gt;
|CM_CANNOTLAUNCH&lt;br /&gt;
|-&lt;br /&gt;
|PDS_EXISTS&lt;br /&gt;
|-&lt;br /&gt;
|PDS_ACTIVE&lt;br /&gt;
|-&lt;br /&gt;
|PDS_INACTIVE&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_HAS_TORPEDO&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_HAS_MINE&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_HAS_PROBE&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_CAN_BE_ARMED”&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_CAN_POWER_DOWN&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_CAN_BE_DISABLED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_CAN_SPIN_UP&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_CAN_FIRE&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_CAN_LAUNCH&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_LAUNCHED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_EMPTY&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_SPINNING_UP&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_LINKED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_HAS_EXP&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_HAS_EMP&lt;br /&gt;
|-&lt;br /&gt;
|TARGET_AND_WEAPON_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_1_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_2_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_3_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_4_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_5_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|CAN_SET_TARGET&lt;br /&gt;
|-&lt;br /&gt;
|CAN_CHANGE_TARGET&lt;br /&gt;
|-&lt;br /&gt;
|CANNOT_SET_OR_CHANGE_TARGET&lt;br /&gt;
|-&lt;br /&gt;
|PDL_ACTIVE&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Power&lt;br /&gt;
|-&lt;br /&gt;
|PWR_IS_DRAINING&lt;br /&gt;
|-&lt;br /&gt;
|PWR_IS_GENERATING&lt;br /&gt;
|-&lt;br /&gt;
|IS_TURNED_ON&lt;br /&gt;
|-&lt;br /&gt;
|IS_TURNED_OFF&lt;br /&gt;
|-&lt;br /&gt;
|EMCON_MODE&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CURRENT_MODULE_ON&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CURRENT_MODULE_OFF&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CURRENT_MODULE_EMCON_ON&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CURRENT_MODULE_EMCON_OFF&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CURRENT_MODULE_CAN_SCRAM&lt;br /&gt;
|-&lt;br /&gt;
|PWR_REACTOR_ON&lt;br /&gt;
|-&lt;br /&gt;
|PWR_REACTOR_OFF&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Comms&lt;br /&gt;
|-&lt;br /&gt;
|IFF_ACTIVE&lt;br /&gt;
|-&lt;br /&gt;
|COMMS_AUTOSYNC_ON&lt;br /&gt;
|-&lt;br /&gt;
|BEING_HAILED&lt;br /&gt;
|-&lt;br /&gt;
|SELECTED_OBJECT_CAN_COMMUNICATE&lt;br /&gt;
|-&lt;br /&gt;
|HAS_EMAILS_TO_DOWNLOAD&lt;br /&gt;
|-&lt;br /&gt;
|SOS_ACTIVE&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Sensors&lt;br /&gt;
|-&lt;br /&gt;
|SENSORS_NAV_LINKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSORS_HISTORY_LOCKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSORS_AUTO&lt;br /&gt;
|-&lt;br /&gt;
|LADAR_ACTIVE&lt;br /&gt;
|-&lt;br /&gt;
|LADAR_FUNCTIONAL&lt;br /&gt;
|-&lt;br /&gt;
|LADAR_INACTIVE&lt;br /&gt;
|-&lt;br /&gt;
|LADAR_DETECTED&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Engineering&lt;br /&gt;
|-&lt;br /&gt;
|ENG_MODULE_ON&lt;br /&gt;
|-&lt;br /&gt;
|ENG_MODULE_OFF&lt;br /&gt;
|-&lt;br /&gt;
|ENG_MODULE_CAN_OPEN&lt;br /&gt;
|-&lt;br /&gt;
|ENG_MODULE_OPEN&lt;br /&gt;
|-&lt;br /&gt;
|ENG_NO_MODULE_OPEN&lt;br /&gt;
|-&lt;br /&gt;
|ENG_CAN_CLOSE_CURRENT_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|ENG_MODULE_CAN_BE_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|ENG_NO_TRAY_OBJECT_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|ENG_CAN_REPAIR_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_IS_REPAIRING&lt;br /&gt;
|-&lt;br /&gt;
|AUTO_REPAIR_ENABLED&lt;br /&gt;
|-&lt;br /&gt;
|AUTO_REPAIR_IDLE&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_REACTOR_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_REACTOR_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_REACTOR_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_REACTOR_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_REACTOR_FUNCTIONING&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_MAINDRIVE_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_MAINDRIVE_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_MAINDRIVE_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_MAINDRIVE_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_RCS_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_RCS_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_RCS_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_RCS_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_COMMS_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_COMMS_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_COMMS_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_COMMS_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT1_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT1_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT1_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT1_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT2_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT2_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT2_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT2_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT3_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT3_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT3_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT3_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_HELM_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_HELM_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_HELM_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_HELM_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_SENSORS_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_SENSORS_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_SENSORS_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_SENSORS_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_NAVCOM_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_NAVCOM_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_NAVCOM_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_NAVCOM_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_WEAP_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_WEAP_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_WEAP_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_WEAP_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_JUMPDRIVE_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_JUMPDRIVE_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_JUMPDRIVE_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_JUMPDRIVE_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BOOTING&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_DISCONNECTED&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Misc&lt;br /&gt;
|-&lt;br /&gt;
|IS_IN_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_IN_STANDARD_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_IN_HIGH_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_IN_POLAR_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|NOT_IN_STANDARD_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|NOT_IN_HIGH_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|NOT_IN_POLAR_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_CHANGING_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_LEAVING_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_ENTERING_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_CORRECTING_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_IN_STABLE_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_SPACE_DISC&lt;br /&gt;
|-&lt;br /&gt;
|DONT_SHOW_SPACE_DISC&lt;br /&gt;
|-&lt;br /&gt;
|CAN_TELEPORT&lt;br /&gt;
|-&lt;br /&gt;
|IS_MOORED&lt;br /&gt;
|-&lt;br /&gt;
|IS_MOORED_TO_DEBRIS&lt;br /&gt;
|-&lt;br /&gt;
|IS_MOORED_TO_CARGO&lt;br /&gt;
|-&lt;br /&gt;
|HAS_GRAPPLING_ARM&lt;br /&gt;
|-&lt;br /&gt;
|GRAPPLING_ARM_IN_USE&lt;br /&gt;
|-&lt;br /&gt;
|CAN_GRAPPLE_MOORED&lt;br /&gt;
|-&lt;br /&gt;
|CAN_GRAPPLE_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|CAN_JETTISON&lt;br /&gt;
|-&lt;br /&gt;
|CAN_JETTISON_ALL&lt;br /&gt;
|-&lt;br /&gt;
|CAN_HACK&lt;br /&gt;
|-&lt;br /&gt;
|CANNOT_HACK&lt;br /&gt;
|-&lt;br /&gt;
|HAS_HACKING_UNIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_HACKING&lt;br /&gt;
|-&lt;br /&gt;
|SHOULD_SHOW_CARGO_SCREEN&lt;br /&gt;
|-&lt;br /&gt;
|CAN_REPAIR_HULL_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CANNOT_REPAIR_HULL_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CAN_REPAIR_MODULES_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CANNOT_REPAIR_MODULES_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CAN_REARM_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CANNOT_REARM_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CAN_BUY_CM_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CANNOT_BUY_CM_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CAN_JUMP_IN_TUTORIAL&lt;br /&gt;
|-&lt;br /&gt;
|CAN_DETECT_CASSANDRA&lt;br /&gt;
|-&lt;br /&gt;
|SUBMENU_OPTIONS&lt;br /&gt;
|-&lt;br /&gt;
|SUBMENU_INPUT&lt;br /&gt;
|-&lt;br /&gt;
|SUBMENU_NEWS&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_HASPURCHASE&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_VALIDPURCHASE&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_INVALIDPURCHASE&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_HASSALE&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_VALIDSALE&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_INVALIDSALE&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_HASPURCHASEORSALE&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_ATMENU&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_NOTATMENU&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_MENUIS&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANPURCHASELICENSE&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANNOTPURCHASELICENSE&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_LOANGIVERSELECTED&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_LOANGIVERNOTSELECTED&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_REPAYINGLOAN&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_LOANVALID&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_LOANINVALID&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_REPAYMENTVALID&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_REPAYMENTINVALID&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANTAKECONTRACT&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANNOTTAKECONTRACT&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANTAKEPASSENGER&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANNOTTAKEPASSENGER&lt;br /&gt;
|-&lt;br /&gt;
|WIRE_VISIBLE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_ATMENU&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_AT&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_REPAIR&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_REPAIR&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_BUY_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_BUY_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_SELL_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_SELL_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_UPGRADE_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_UPGRADE_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_BUY_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_BUY_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_SELL_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_SELL_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_BUY_ARMAMENT&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_BUY_ARMAMENT&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_SELL_ARMAMENT&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_SELL_ARMAMENT&lt;br /&gt;
|-&lt;br /&gt;
|SHIP_CANBUY&lt;br /&gt;
|-&lt;br /&gt;
|SHIP_CANNOTBUY&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_WRECK_HAS_NOT_DOWNLOADED_DATA&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_WRECK_HAS_DOWNLOADED_DATA&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_WRECK_HAS_UNCLAMPED_CARGO&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_WRECK_HAS_NOT_UNCLAMPED_CARGO&lt;br /&gt;
|-&lt;br /&gt;
|CAN_BOARD_BROKER_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|CAN_NOT_BOARD_BROKER_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|IS_VIEWING_SELECTED_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|IS_NOT_VIEWING_SELECTED_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|STARTING_NEW_GAME&lt;br /&gt;
|-&lt;br /&gt;
|CONVERSATION_ACTIVE&lt;br /&gt;
|-&lt;br /&gt;
|MUSIC_PLAYING&lt;br /&gt;
|-&lt;br /&gt;
|MUSIC_NOT_PLAYING&lt;br /&gt;
|-&lt;br /&gt;
|CAN_USE_MUSIC&lt;br /&gt;
|-&lt;br /&gt;
|SHIP_DISABLED&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANTAKEBOUNTY&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANNOTTAKEBOUNTY&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:HardwareInterfacing]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Serial_Commands&amp;diff=976</id>
		<title>Serial Commands</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Serial_Commands&amp;diff=976"/>
				<updated>2018-07-25T21:53:30Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Commands&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Almost all of these have not been tested for effect&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Piloting&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;STOP_MAIN_ENGINE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Turns off the main engine&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;BURN_MAIN_ENGINE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Turns on the main engine&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TOGGLE_MAIN_ENGINE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Toggles the state of the main engine&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ENGAGE_COURSE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Engages the Auto pilot&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;FIRE_RCS_CW&amp;lt;/code&amp;gt;&lt;br /&gt;
|Starts rotating the ship clockwise&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;FULL_STOP&amp;lt;/code&amp;gt;&lt;br /&gt;
|Engages the Auto pilot to stop the ship&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;STOP_RCS&amp;lt;/code&amp;gt;&lt;br /&gt;
|Stops the ships rotation&lt;br /&gt;
|-&lt;br /&gt;
|FIRE_RCS_CCW&lt;br /&gt;
|Starts Rotating the ship counter-clockwise&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;UNDOCK&amp;lt;/code&amp;gt;&lt;br /&gt;
|Undocks the ship&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;CANCEL_AUTOPILOT&amp;lt;/code&amp;gt;&lt;br /&gt;
|Turns off the Auto Pilot&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ROTATE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PAY_FOR_JUMPGATE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ACTIVATE_JUMPGATE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_SPIN_UP_JUMP_DRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_BEGIN_JUMP&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAIN_DRIVE_POWER_DECREASE&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Sets main drive power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAIN_DRIVE_POWER_INCREASE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Nav&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PLOT_COURSE&amp;lt;/code&amp;gt;&lt;br /&gt;
|plots a course to the cursor on the nav console&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;REMOVE_LAST_WAYPOINT&amp;lt;/code&amp;gt;&lt;br /&gt;
|Removes the last point plotted on a course(maybe?)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;CLEAR_COURSE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Removes all plotted waypoints&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_MOVE_RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;6&amp;quot;|Moves the map&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_MOVE_LEFT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_MOVE_DOWN&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_MOVE_UP&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_ZOOM_OUT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_ZOOM_IN&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;MAP_CENTER&amp;lt;/code&amp;gt;&lt;br /&gt;
|Centers the map on the ship&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TOGGLE_MAP_MODE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Switches between Cluster and local view&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_CALCULATE_JUMP_SOLUTION&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_SET_JUMP_DESTINATION&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Weapons&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE1&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;5&amp;quot;|Selects a weapon tube&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE2&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE3&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE4&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE5&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;DESELECT_TUBE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Removes weapon tube selection&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SELECT_TUBE&amp;lt;/code&amp;gt;&lt;br /&gt;
|Selects a weapon tube;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;POWER_DOWN_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|Powers down a weapon&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SPIN_UP_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|Starts readying a tube to fire&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SET_WEAPON_TARGET&amp;lt;/code&amp;gt;&lt;br /&gt;
|Sets the Weapon target(Info needs update)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;FIRE_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|Fires selected weapon&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ARM_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|Prepares a weapon to fire&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;UNLINK_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;FIRE_CM&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;DISABLE_WEAPON&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;EMCON_OFF&amp;lt;/code&amp;gt;&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Sets EMCON state&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;EMCON_ON&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TOGGLE_EMCON&amp;lt;/code&amp;gt;&lt;br /&gt;
|Toggles EMCON state&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;ENG_DISCONNECT_CURRENT_MODULE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_CURRENT_MODULE_EMCON&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;SCRAM_REACTOR&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;JMP_DISCHARGE_JUMP_DRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;PWR_TOGGLE_CURRENT_MODULE_POWER&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;TOGGLE_REACTOR&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;POWER_UP_REACTOR&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CONNECT_HELM&lt;br /&gt;
|-&lt;br /&gt;
|PWR_DISCONNECT_HELM&lt;br /&gt;
|-&lt;br /&gt;
|PWR_DISCONNECT_RCS&lt;br /&gt;
|-&lt;br /&gt;
|PWR_TOGGLE_HELM&lt;br /&gt;
|-&lt;br /&gt;
|PWR_TOGGLE_RCS&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CONNECT_RCS&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CONNECT_MAINDRIVE&lt;br /&gt;
|-&lt;br /&gt;
|PWR_DISCONNECT_MAINDRIVE&lt;br /&gt;
|-&lt;br /&gt;
|PWR_DISCONNECT_COMMS&lt;br /&gt;
|-&lt;br /&gt;
|PWR_TOGGLE_MAINDRIVE&lt;br /&gt;
|-&lt;br /&gt;
|PWR_TOGGLE_COMMS&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CONNECT_COMMS&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CONNECT_WEAP&lt;br /&gt;
|-&lt;br /&gt;
|PWR_DISCONNECT_WEAP&lt;br /&gt;
|-&lt;br /&gt;
|PWR_DISCONNECT_JUMPDRIVE&lt;br /&gt;
|-&lt;br /&gt;
|PWR_TOGGLE_WEAP&lt;br /&gt;
|-&lt;br /&gt;
|PWR_TOGGLE_JUMPDRIVE&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CONNECT_JUMPDRIVE&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CONNECT_BATT1&lt;br /&gt;
|-&lt;br /&gt;
|PWR_DISCONNECT_BATT1&lt;br /&gt;
|-&lt;br /&gt;
|PWR_DISCONNECT_BATT2&lt;br /&gt;
|-&lt;br /&gt;
|PWR_TOGGLE_BATT1&lt;br /&gt;
|-&lt;br /&gt;
|PWR_TOGGLE_BATT2&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CONNECT_BATT2&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CONNECT_BATT3&lt;br /&gt;
|-&lt;br /&gt;
|PWR_DISCONNECT_BATT3&lt;br /&gt;
|-&lt;br /&gt;
|PWR_DISCONNECT_NAVCOM&lt;br /&gt;
|-&lt;br /&gt;
|PWR_TOGGLE_BATT3&lt;br /&gt;
|-&lt;br /&gt;
|PWR_TOGGLE_NAVCOM&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CONNECT_NAVCOM&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CONNECT_SENS&lt;br /&gt;
|-&lt;br /&gt;
|PWR_DISCONNECT_SENS&lt;br /&gt;
|-&lt;br /&gt;
|TURN_ON_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|PWR_TOGGLE_SENS&lt;br /&gt;
|-&lt;br /&gt;
|TURN_OFF_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|PWR_SELECT_MODULE&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Comms&lt;br /&gt;
|-&lt;br /&gt;
|TURN_OFF_IFF&lt;br /&gt;
|Turn off IFF signal (Identify Friend or Foe).&lt;br /&gt;
|-&lt;br /&gt;
|TURN_ON_IFF&lt;br /&gt;
|Turn on IFF signal (Identify Friend or Foe).&lt;br /&gt;
|-&lt;br /&gt;
|COMMUNICATE_WITH_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|REQUEST_UNDOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|REQUEST_DOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|COMMS_TURN_ON_AUTO&lt;br /&gt;
|-&lt;br /&gt;
|COMMS_SYNC&lt;br /&gt;
|-&lt;br /&gt;
|COMMS_TURN_OFF_AUTO&lt;br /&gt;
|-&lt;br /&gt;
|TURN_OFF_SOS&lt;br /&gt;
|Turn off distress beacon.&lt;br /&gt;
|-&lt;br /&gt;
|TURN_ON_SOS&lt;br /&gt;
|Turn on distress beacon.&lt;br /&gt;
|-&lt;br /&gt;
!Colspan=&amp;quot;2&amp;quot;|Sensors&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SELECT_UP&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SELECT_DOWN&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SELECT_LEFT&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SELECT_RIGHT&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SET_NAV_AND_SENSOR_LINKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SELECT_TAB&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SET_HISTORY_LOCKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_UNSET_NAV_AND_SENSOR_LINKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_SET_AUTO&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_UNSET_HISTORY_LOCKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSOR_UNSET_AUTO&lt;br /&gt;
|-&lt;br /&gt;
!Colspan=&amp;quot;2&amp;quot;|Player movement&lt;br /&gt;
|-&lt;br /&gt;
|TIME_SLOWER&lt;br /&gt;
|-&lt;br /&gt;
|TIME_FASTER&lt;br /&gt;
|-&lt;br /&gt;
|ROOM_RIGHT&lt;br /&gt;
|-&lt;br /&gt;
|ROOM_LEFT&lt;br /&gt;
|-&lt;br /&gt;
|LEAVE_SHIP&lt;br /&gt;
|-&lt;br /&gt;
!Colspan=&amp;quot;2&amp;quot;|Mic&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_TO_STANDARD_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|BREAK_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_TO_POLAR_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|CHANGE_TO_HIGH_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|RESCIND_UNDOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|RESCIND_DOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|PAY_DOCKED_STATION&lt;br /&gt;
|-&lt;br /&gt;
|ENABLE_AUTO_REPAIR&lt;br /&gt;
|-&lt;br /&gt;
|DISABLE_AUTO_REPAIR&lt;br /&gt;
|-&lt;br /&gt;
|MAP_CLICK&lt;br /&gt;
|-&lt;br /&gt;
|ENG_OPEN_CURRENT_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|ENG_CONNECT_CURRENT_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|ENG_REPAIR_CURRENT_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_CLOSE_CURRENT_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|TELEPORT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_SELECT_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_SELECT_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|ENG_UNMOUNT_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_MOUNT_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_TOGGLE_SCREW&lt;br /&gt;
|-&lt;br /&gt;
|ENG_DESTROY_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|HELM_SET_ATAC_MODE&lt;br /&gt;
|not sure what ATAC is&lt;br /&gt;
|-&lt;br /&gt;
|ENG_TOGGLE_SHIELD&lt;br /&gt;
|-&lt;br /&gt;
|ENABLE_LADAR&lt;br /&gt;
|-&lt;br /&gt;
|HELM_UNSET_ATAC_MODE&lt;br /&gt;
|-&lt;br /&gt;
|TOGGLE_LADAR&lt;br /&gt;
|-&lt;br /&gt;
|DISABLE_LADAR&lt;br /&gt;
|-&lt;br /&gt;
|PWR_POWER_DECREASE&lt;br /&gt;
|-&lt;br /&gt;
|PWR_POWER_INCREASE&lt;br /&gt;
|-&lt;br /&gt;
|DEACTIVATE_PDS&lt;br /&gt;
|-&lt;br /&gt;
|ACTIVATE_PDS&lt;br /&gt;
|-&lt;br /&gt;
|TOGGLE_PDS&lt;br /&gt;
|-&lt;br /&gt;
|SHIP_CARGO_DOWN&lt;br /&gt;
|-&lt;br /&gt;
|JETTISON_CARGO&lt;br /&gt;
|-&lt;br /&gt;
|SHIP_CARGO_UP&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_CARGO_DOWN&lt;br /&gt;
|-&lt;br /&gt;
|JETTISON_ALL&lt;br /&gt;
|-&lt;br /&gt;
|TRANSFER_CARGO_FROM_MOORED&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_CARGO_UP&lt;br /&gt;
|-&lt;br /&gt;
|REPAIR_HULL_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|TRANSFER_CARGO_FROM_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|REARM_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|REPAIR_MODULES_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|TUTORIAL_JUMP&lt;br /&gt;
|-&lt;br /&gt;
|BUY_CM_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_PERFORM&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_TOMAX&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_MENU&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_CANCEL&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_TAKELOAN&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_GETLICENSE&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_TAKECONTRACT&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_REPAYLOAN&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_TOMENU&lt;br /&gt;
|-&lt;br /&gt;
|VIEW_WIRE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_BUY_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_REPAIR&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_UPGRADE_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_SELL_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_MODULETRANSACTION&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANCELMODULE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_SELLARMAMENT&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_BUYARMAMENT&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_WRECK_UNLOCK_CARGO&lt;br /&gt;
|-&lt;br /&gt;
|BUY_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|SET_VIEW_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_WRECK_DOWNLOAD_DATA&lt;br /&gt;
|-&lt;br /&gt;
|TAKE_PASSENGER&lt;br /&gt;
|-&lt;br /&gt;
|BOARD_BROKER_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|PREV_TRACK&lt;br /&gt;
|Play the previous track from music player.&lt;br /&gt;
|-&lt;br /&gt;
|NEXT_TRACK&lt;br /&gt;
|Play the next track from music player.&lt;br /&gt;
|-&lt;br /&gt;
|RESUME_TRACK&lt;br /&gt;
|Resume track from the music player.&lt;br /&gt;
|-&lt;br /&gt;
|PAUSE_TRACK&lt;br /&gt;
|Pause track from the music player.&lt;br /&gt;
|-&lt;br /&gt;
|QUIT_TO_MENU&lt;br /&gt;
|-&lt;br /&gt;
|TAKE_BOUNTY&lt;br /&gt;
|-&lt;br /&gt;
|QUIT_TO_OS&lt;br /&gt;
|-&lt;br /&gt;
|HACK&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:HardwareInterfacing]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Talk:Arduinos_in_Space&amp;diff=975</id>
		<title>Talk:Arduinos in Space</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Talk:Arduinos_in_Space&amp;diff=975"/>
				<updated>2018-07-24T11:55:56Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: Created page with &amp;quot;= To do =  * Explain different ways to request data * Explain different ways to send commands * Explain callbacks * Full API docs&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= To do =&lt;br /&gt;
&lt;br /&gt;
* Explain different ways to request data&lt;br /&gt;
* Explain different ways to send commands&lt;br /&gt;
* Explain callbacks&lt;br /&gt;
* Full API docs&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=974</id>
		<title>Arduinos in Space</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=974"/>
				<updated>2018-07-24T11:53:26Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://bitbucket.org/pjhardy/arduinosinspace/src/master/ Arduinos in Space] is an Arduino library to interface with Objects in Space. It aims to provide a high level, Arduino-like interface while still being powerful and flexible.&lt;br /&gt;
&lt;br /&gt;
Arduinos in Space is an open source library, that was neither written nor supported by Flat Earth.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Any Arduino-compatible board should work. The Hello World sketch below needs a board with a built-in LED. All genuine Arduino/Genuino boards have one, as well as most Arduino-compatible boards.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
The library is not (yet) available through the Arduino Library Manager, so must be installed manually.&lt;br /&gt;
&lt;br /&gt;
# Download the most recent release from the [https://bitbucket.org/pjhardy/arduinosinspace/downloads/ downloads section] of the library repository on Bitbucket.&lt;br /&gt;
# Open the Arduino IDE, and navigate to Sketch -&amp;gt; Include Library -&amp;gt; Add .ZIP Library...&lt;br /&gt;
# Select the zip file previously downloaded.&lt;br /&gt;
&lt;br /&gt;
== Hello World ==&lt;br /&gt;
&lt;br /&gt;
First, ensure Objects in Space is configured to talk to hardware, following the directions in [[Getting started with hardware]].&lt;br /&gt;
&lt;br /&gt;
Open the Arduino IDE, create a new sketch (File -&amp;gt; New), and enter the following code:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#include &amp;quot;ArduinosInSpace.h:&lt;br /&gt;
&lt;br /&gt;
ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  OIS.begin();&lt;br /&gt;
&lt;br /&gt;
  OIS.registerBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
  OIS.activate();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  OIS.update();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save this (call it something like &amp;quot;HelloWorld&amp;quot;, then build and upload to your board. With the board still connected, ensure the Arduino serial monitor is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; running, and launch Objects in Space. All going well, the game will open a connection to your board, and the built-in LED on your board will turn on to indicate when EMCON mode is active.&lt;br /&gt;
&lt;br /&gt;
== Understanding Arduinos in Space ==&lt;br /&gt;
&lt;br /&gt;
=== Objects in Space connections ===&lt;br /&gt;
&lt;br /&gt;
Before getting in to how Arduinos in Space, let&amp;#039;s talk about how the game communicates with devices. A connection between Objects in Space (the server) and an Arduino (the client) has three separate phases:&lt;br /&gt;
&lt;br /&gt;
* Handshaking: the server is listening for an initial request from the client.&lt;br /&gt;
* Syncing: the client sends commands to the server defining expected inputs and outputs.&lt;br /&gt;
* Active: the server is able to send game data to the client, and the client is able to send commands to the server.&lt;br /&gt;
&lt;br /&gt;
=== Arduinos in Space overview ===&lt;br /&gt;
&lt;br /&gt;
Using Arduinos in Space is fairly straightforward.  In the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; method of your sketch you start by setting up a serial connection with the game, and creating an Arduinos in Space object that will manage the connection. Then you use methods on that object to progress through the different connection phases. Once the connection has been fully established, in the &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method you regularly call the Arduinos in Space &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method to check for new input and send commands. Finally, you ensure that callback functions are defined to handle data from the game, and send commands to the game using the &amp;lt;code&amp;gt;sendCommand()&amp;lt;/code&amp;gt; function or built in input handlers.&lt;br /&gt;
&lt;br /&gt;
== Breaking down HelloWorld ==&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s examine the different phases by looking at the above HelloWorld sketch line-by-line.&lt;br /&gt;
&lt;br /&gt;
=== Initial setup ===&lt;br /&gt;
&lt;br /&gt;
First, we need to include the Arduinos in Space library:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;ArduinosInSpace.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we create an Arduinos in Space object. We&amp;#039;ll use this object for all of our interactions with the game.&lt;br /&gt;
&lt;br /&gt;
The object constructor takes three arguments. The first is the serial object we&amp;#039;ll use. In most instances, this will just be &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, but SoftwareSerial and extended serial interfaces are also supported. The second argument is the number of ``request channels`` we&amp;#039;ll be creating - these are requests for data from the game. The third argument is the number of ``managed input pins`` that will send commands to the game. We&amp;#039;ll learn what these are later.&lt;br /&gt;
&lt;br /&gt;
For HelloWorld we create an object named &amp;lt;code&amp;gt;OIS&amp;lt;/code&amp;gt;, bind it to the serial connection named &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, with one data request and no commands being sent:&lt;br /&gt;
&lt;br /&gt;
 ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
Then we begin the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; function and move through connection phases with the game.&lt;br /&gt;
&lt;br /&gt;
=== Handshaking ===&lt;br /&gt;
&lt;br /&gt;
Before doing anything else, we need to begin the serial connection from the client side. Note that the game only supports communication at 9600 baud.&lt;br /&gt;
&lt;br /&gt;
 Serial.begin(9600);&lt;br /&gt;
&lt;br /&gt;
Now the game is in the Handshaking phase, just waiting for us to send a handshaking request. Arduinos in Space will handle the handshaking, we just have to call the &amp;lt;code&amp;gt;begin()&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
 OIS.begin();&lt;br /&gt;
&lt;br /&gt;
This will send the commands required to complete handshaking, and move in to the sync phase.&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
In the sync phase, the game is expecting us to send commands specifying what data we would like to receive, and what commands we would like to send, when the connection is active. Arduinos in Space has numerous methods available to register commands and request data. But for HelloWorld we just use one.&lt;br /&gt;
&lt;br /&gt;
Here, we&amp;#039;re requesting Boolean (either on or off) information about EMCON state - we&amp;#039;re asking the game to tell us if EMCON is on or off. When we request data like this, we need to tell Arduinos in Space what to do with it. For HelloWorld we tell the library to directly manage the LED_BUILTIN pin - this is an alias for the pin connected to the Arduino&amp;#039;s built-in LED. When requested in this way, Arduinos in Space will monitor the data sent from the game, and automatically set the pin &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt; depending on EMCON status.&lt;br /&gt;
&lt;br /&gt;
 OIS.requestBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
Once we&amp;#039;ve requested all of the inputs and outputs we&amp;#039;d like, we move to the active phase. Arduinos in Space does this by calling the &amp;lt;code&amp;gt;activate()&amp;lt;/code&amp;gt; method:&lt;br /&gt;
&lt;br /&gt;
 OIS.activate();&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s all that&amp;#039;s needed in the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; method, and we move to the active phase and the Arduino &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
=== Active ===&lt;br /&gt;
&lt;br /&gt;
Once in the active phase, the &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method is the workhorse of Arduinos in Space. This method reads incoming serial data from the game, parses it, processes the commands and data it contains. It also updates the status of managed input pins, sending commands back to the game if required.&lt;br /&gt;
&lt;br /&gt;
All this means that it needs to be called frequently. For HelloWorld, the &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method does nothing else:&lt;br /&gt;
&lt;br /&gt;
  OIS.update();&lt;br /&gt;
&lt;br /&gt;
Whenever the game sends a new EMCON status update, calling &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; will cause Arduinos in Space to read the data, and if EMCON is on it will turn on the LED_BUILTIN LED. If EMCON is off, LED_BUILTIN will be turned off.&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=973</id>
		<title>Arduinos in Space</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=973"/>
				<updated>2018-07-24T11:39:12Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://bitbucket.org/pjhardy/arduinosinspace/src/master/ Arduinos in Space] is an Arduino library to interface with Objects in Space. It aims to provide a high level, Arduino-like interface while still being powerful and flexible.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Any Arduino-compatible board should work. The Hello World sketch below needs a board with a built-in LED. All genuine Arduino/Genuino boards have one, as well as most Arduino-compatible boards.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
The library is not (yet) available through the Arduino Library Manager, so must be installed manually.&lt;br /&gt;
&lt;br /&gt;
# Download the most recent release from the [https://bitbucket.org/pjhardy/arduinosinspace/downloads/ downloads section] of the library repository on Bitbucket.&lt;br /&gt;
# Open the Arduino IDE, and navigate to Sketch -&amp;gt; Include Library -&amp;gt; Add .ZIP Library...&lt;br /&gt;
# Select the zip file previously downloaded.&lt;br /&gt;
&lt;br /&gt;
== Hello World ==&lt;br /&gt;
&lt;br /&gt;
First, ensure Objects in Space is configured to talk to hardware, following the directions in [[Getting started with hardware]].&lt;br /&gt;
&lt;br /&gt;
Open the Arduino IDE, create a new sketch (File -&amp;gt; New), and enter the following code:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#include &amp;quot;ArduinosInSpace.h:&lt;br /&gt;
&lt;br /&gt;
ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  OIS.begin();&lt;br /&gt;
&lt;br /&gt;
  OIS.registerBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
  OIS.activate();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  OIS.update();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save this (call it something like &amp;quot;HelloWorld&amp;quot;, then build and upload to your board. With the board still connected, ensure the Arduino serial monitor is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; running, and launch Objects in Space. All going well, the game will open a connection to your board, and the built-in LED on your board will turn on to indicate when EMCON mode is active.&lt;br /&gt;
&lt;br /&gt;
== Understanding Arduinos in Space ==&lt;br /&gt;
&lt;br /&gt;
=== Objects in Space connections ===&lt;br /&gt;
&lt;br /&gt;
Before getting in to how Arduinos in Space, let&amp;#039;s talk about how the game communicates with devices. A connection between Objects in Space (the server) and an Arduino (the client) has three separate phases:&lt;br /&gt;
&lt;br /&gt;
* Handshaking: the server is listening for an initial request from the client.&lt;br /&gt;
* Syncing: the client sends commands to the server defining expected inputs and outputs.&lt;br /&gt;
* Active: the server is able to send game data to the client, and the client is able to send commands to the server.&lt;br /&gt;
&lt;br /&gt;
=== Arduinos in Space overview ===&lt;br /&gt;
&lt;br /&gt;
Using Arduinos in Space is fairly straightforward.  In the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; method of your sketch you start by setting up a serial connection with the game, and creating an Arduinos in Space object that will manage the connection. Then you use methods on that object to progress through the different connection phases. Once the connection has been fully established, in the &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method you regularly call the Arduinos in Space &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method to check for new input and send commands. Finally, you ensure that callback functions are defined to handle data from the game, and send commands to the game using the &amp;lt;code&amp;gt;sendCommand()&amp;lt;/code&amp;gt; function or built in input handlers.&lt;br /&gt;
&lt;br /&gt;
== Breaking down HelloWorld ==&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s examine the different phases by looking at the above HelloWorld sketch line-by-line.&lt;br /&gt;
&lt;br /&gt;
=== Initial setup ===&lt;br /&gt;
&lt;br /&gt;
First, we need to include the Arduinos in Space library:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;ArduinosInSpace.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we create an Arduinos in Space object. We&amp;#039;ll use this object for all of our interactions with the game.&lt;br /&gt;
&lt;br /&gt;
The object constructor takes three arguments. The first is the serial object we&amp;#039;ll use. In most instances, this will just be &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, but SoftwareSerial and extended serial interfaces are also supported. The second argument is the number of ``request channels`` we&amp;#039;ll be creating - these are requests for data from the game. The third argument is the number of ``managed input pins`` that will send commands to the game. We&amp;#039;ll learn what these are later.&lt;br /&gt;
&lt;br /&gt;
For HelloWorld we create an object named &amp;lt;code&amp;gt;OIS&amp;lt;/code&amp;gt;, bind it to the serial connection named &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, with one data request and no commands being sent:&lt;br /&gt;
&lt;br /&gt;
 ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
Then we begin the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; function and move through connection phases with the game.&lt;br /&gt;
&lt;br /&gt;
=== Handshaking ===&lt;br /&gt;
&lt;br /&gt;
Before doing anything else, we need to begin the serial connection from the client side. Note that the game only supports communication at 9600 baud.&lt;br /&gt;
&lt;br /&gt;
 Serial.begin(9600);&lt;br /&gt;
&lt;br /&gt;
Now the game is in the Handshaking phase, just waiting for us to send a handshaking request. Arduinos in Space will handle the handshaking, we just have to call the &amp;lt;code&amp;gt;begin()&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
 OIS.begin();&lt;br /&gt;
&lt;br /&gt;
This will send the commands required to complete handshaking, and move in to the sync phase.&lt;br /&gt;
&lt;br /&gt;
=== Syncing ===&lt;br /&gt;
&lt;br /&gt;
In the sync phase, the game is expecting us to send commands specifying what data we would like to receive, and what commands we would like to send, when the connection is active. Arduinos in Space has numerous methods available to register commands and request data. But for HelloWorld we just use one.&lt;br /&gt;
&lt;br /&gt;
Here, we&amp;#039;re requesting Boolean (either on or off) information about EMCON state - we&amp;#039;re asking the game to tell us if EMCON is on or off. When we request data like this, we need to tell Arduinos in Space what to do with it. For HelloWorld we tell the library to directly manage the LED_BUILTIN pin - this is an alias for the pin connected to the Arduino&amp;#039;s built-in LED. When requested in this way, Arduinos in Space will monitor the data sent from the game, and automatically set the pin &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt; depending on EMCON status.&lt;br /&gt;
&lt;br /&gt;
 OIS.requestBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
Once we&amp;#039;ve requested all of the inputs and outputs we&amp;#039;d like, we move to the active phase. Arduinos in Space does this by calling the &amp;lt;code&amp;gt;activate()&amp;lt;/code&amp;gt; method:&lt;br /&gt;
&lt;br /&gt;
 OIS.activate();&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s all that&amp;#039;s needed in the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; method, and we move to the active phase and the Arduino &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
=== Active ===&lt;br /&gt;
&lt;br /&gt;
Once in the active phase, the &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method is the workhorse of Arduinos in Space. This method reads incoming serial data from the game, parses it, processes the commands and data it contains. It also updates the status of managed input pins, sending commands back to the game if required.&lt;br /&gt;
&lt;br /&gt;
All this means that it needs to be called frequently. For HelloWorld, the &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method does nothing else:&lt;br /&gt;
&lt;br /&gt;
  OIS.update();&lt;br /&gt;
&lt;br /&gt;
Whenever the game sends a new EMCON status update, calling &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; will cause Arduinos in Space to read the data, and if EMCON is on it will turn on the LED_BUILTIN LED. If EMCON is off, LED_BUILTIN will be turned off.&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=972</id>
		<title>Arduinos in Space</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=972"/>
				<updated>2018-07-24T11:03:26Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://bitbucket.org/pjhardy/arduinosinspace/src/master/ Arduinos in Space] is an Arduino library to interface with Objects in Space. It aims to provide a high level, Arduino-like interface while still being powerful and flexible.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Any Arduino-compatible board should work. The Hello World sketch below needs a board with a built-in LED. All genuine Arduino/Genuino boards have one, as well as most Arduino-compatible boards.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
The library is not (yet) available through the Arduino Library Manager, so must be installed manually.&lt;br /&gt;
&lt;br /&gt;
# Download the most recent release from the [https://bitbucket.org/pjhardy/arduinosinspace/downloads/ downloads section] of the library repository on Bitbucket.&lt;br /&gt;
# Open the Arduino IDE, and navigate to Sketch -&amp;gt; Include Library -&amp;gt; Add .ZIP Library...&lt;br /&gt;
# Select the zip file previously downloaded.&lt;br /&gt;
&lt;br /&gt;
=== Hello World ===&lt;br /&gt;
&lt;br /&gt;
First, ensure Objects in Space is configured to talk to hardware, following the directions in [[Getting started with hardware]].&lt;br /&gt;
&lt;br /&gt;
Open the Arduino IDE, create a new sketch (File -&amp;gt; New), and enter the following code:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#include &amp;quot;ArduinosInSpace.h:&lt;br /&gt;
&lt;br /&gt;
ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  OIS.begin();&lt;br /&gt;
&lt;br /&gt;
  OIS.registerBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
  OIS.activate();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  OIS.update();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save this (call it something like &amp;quot;HelloWorld&amp;quot;, then build and upload to your board. With the board still connected, ensure the Arduino serial monitor is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; running, and launch Objects in Space. All going well, the game will open a connection to your board, and the built-in LED on your board will turn on to indicate when EMCON mode is active.&lt;br /&gt;
&lt;br /&gt;
== Understanding Arduinos in Space ==&lt;br /&gt;
&lt;br /&gt;
Using Arduinos in Space is fairly straightforward.  In the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; method of your sketch you start by setting up a serial connection with the game, and creating an Arduinos in Space object that will manage the connection. Then you use methods on that object to progress through the different connection phases. Once the connection has been fully established, in the &amp;lt;code&amp;gt;loop()&amp;lt;/code&amp;gt; method you regularly call the Arduinos in Space &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method to check for new input and send commands. Finally, you ensure that callback functions are defined to handle data from the game, and send commands to the game using the &amp;lt;code&amp;gt;sendCommand()&amp;lt;/code&amp;gt; function or built in input handlers.&lt;br /&gt;
&lt;br /&gt;
== Breaking down HelloWorld ==&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s examine the different phases by looking at the above HelloWorld sketch line-by-line.&lt;br /&gt;
&lt;br /&gt;
=== Initial setup ===&lt;br /&gt;
&lt;br /&gt;
First, we need to include the Arduinos in Space library:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;ArduinosInSpace.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we create an Arduinos in Space object. We&amp;#039;ll use this object for all of our interactions with the game.&lt;br /&gt;
&lt;br /&gt;
The object constructor takes three arguments. The first is the serial object we&amp;#039;ll use. In most instances, this will just be &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, but SoftwareSerial and extended serial interfaces are also supported. The second argument is the number of ``request channels`` we&amp;#039;ll be creating - these are requests for data from the game. The third argument is the number of ``managed input pins`` that will send commands to the game. We&amp;#039;ll learn what these are later.&lt;br /&gt;
&lt;br /&gt;
For HelloWorld we create an object named &amp;lt;code&amp;gt;OIS&amp;lt;/code&amp;gt;, bind it to the serial connection named &amp;lt;code&amp;gt;Serial&amp;lt;/code&amp;gt;, with one data request and no commands being sent:&lt;br /&gt;
&lt;br /&gt;
 ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
Then we begin the &amp;lt;code&amp;gt;setup()&amp;lt;/code&amp;gt; function and move through connection phases with the game.&lt;br /&gt;
&lt;br /&gt;
=== Connection phases ===&lt;br /&gt;
&lt;br /&gt;
A connection between Objects in Space (the server) and an Arduino (the client) has three separate phases:&lt;br /&gt;
&lt;br /&gt;
* Handshaking: the server is listening for an initial request from the client.&lt;br /&gt;
* Syncing: the client sends commands to the server defining expected inputs and outputs.&lt;br /&gt;
* Active: the server is able to send game data to the client, and the client is able to send commands to the server.&lt;br /&gt;
&lt;br /&gt;
==== Handshaking ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=970</id>
		<title>Arduinos in Space</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=970"/>
				<updated>2018-07-24T09:43:39Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://bitbucket.org/pjhardy/arduinosinspace/src/master/ Arduinos in Space] is an Arduino library to interface with Objects in Space. It aims to provide a high level, Arduino-like interface while still being powerful and flexible.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Any Arduino-compatible board should work. The Hello World sketch below needs a board with a built-in LED. All genuine Arduino/Genuino boards have one, as well as most Arduino-compatible boards.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
The library is not (yet) available through the Arduino Library Manager, so must be installed manually.&lt;br /&gt;
&lt;br /&gt;
# Download the most recent release from the [https://bitbucket.org/pjhardy/arduinosinspace/downloads/ downloads section] of the library repository on Bitbucket.&lt;br /&gt;
# Open the Arduino IDE, and navigate to Sketch -&amp;gt; Include Library -&amp;gt; Add .ZIP Library...&lt;br /&gt;
# Select the zip file previously downloaded.&lt;br /&gt;
&lt;br /&gt;
=== Hello World ===&lt;br /&gt;
&lt;br /&gt;
First, ensure Objects in Space is configured to talk to hardware, following the directions in [[Getting started with hardware]].&lt;br /&gt;
&lt;br /&gt;
Open the Arduino IDE, create a new sketch (File -&amp;gt; New), and enter the following code:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#include &amp;quot;ArduinosInSpace.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ObjectsInSpace OIS(Serial, 1, 0);&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  OIS.begin();&lt;br /&gt;
&lt;br /&gt;
  OIS.registerBool(EMCON_MODE, LED_BUILTIN);&lt;br /&gt;
&lt;br /&gt;
  OIS.activate();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  OIS.update();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save this (call it something like &amp;quot;HelloWorld&amp;quot;, then build and upload to your board. With the board still connected, ensure the Arduino serial monitor is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; running, and launch Objects in Space. All going well, the game will open a connection to your board, and the built-in LED on your board will turn on to indicate when EMCON mode is active.&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Category:ArduinosInSpace&amp;diff=969</id>
		<title>Category:ArduinosInSpace</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Category:ArduinosInSpace&amp;diff=969"/>
				<updated>2018-07-24T09:09:46Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: Created blank page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=968</id>
		<title>Arduinos in Space</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=968"/>
				<updated>2018-07-24T09:07:57Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://bitbucket.org/pjhardy/arduinosinspace/src/master/ Arduinos in Space] is an Arduino library to interface with Objects in Space. It aims to provide a high level, Arduino-like interface while still being powerful and flexible.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
The library is not (yet) available through the Arduino Library Manager, so must be installed manually.&lt;br /&gt;
&lt;br /&gt;
# Download the most recent release from the [https://bitbucket.org/pjhardy/arduinosinspace/downloads/ downloads section] of the library repository on Bitbucket.&lt;br /&gt;
# Open the Arduino IDE, and navigate to Sketch -&amp;gt; Include Library -&amp;gt; Add .ZIP Library...&lt;br /&gt;
# Select the zip file previously downloaded.&lt;br /&gt;
&lt;br /&gt;
=== Hello World ===&lt;br /&gt;
&lt;br /&gt;
First, ensure Objects in Space is configured to talk to hardware, following the directions in [[Getting started with hardware]].&lt;br /&gt;
&lt;br /&gt;
[[Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=967</id>
		<title>Arduinos in Space</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=967"/>
				<updated>2018-07-24T09:06:56Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://bitbucket.org/pjhardy/arduinosinspace/src/master/ Arduinos in Space] is an Arduino library to interface with Objects in Space. It aims to provide a high level, Arduino-like interface while still being powerful and flexible.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
The library is not (yet) available through the Arduino Library Manager, so must be installed manually.&lt;br /&gt;
&lt;br /&gt;
# Download the most recent release from the [https://bitbucket.org/pjhardy/arduinosinspace/downloads/ downloads section] of the library repository on Bitbucket.&lt;br /&gt;
# Open the Arduino IDE, and navigate to Sketch -&amp;gt; Include Library -&amp;gt; Add .ZIP Library...&lt;br /&gt;
# Select the zip file previously downloaded.&lt;br /&gt;
&lt;br /&gt;
=== Hello World ===&lt;br /&gt;
&lt;br /&gt;
First, ensure Objects in Space is configured to talk to hardware, following the directions in [[Getting started with hardware]].&lt;br /&gt;
&lt;br /&gt;
[[:Category:ArduinosInSpace]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=966</id>
		<title>Arduinos in Space</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduinos_in_Space&amp;diff=966"/>
				<updated>2018-07-24T08:22:25Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: Created page with &amp;quot;[https://bitbucket.org/pjhardy/arduinosinspace/src/master/ Arduinos in Space] is an Arduino library to interface with Objects in Space. It aims to provide a high level, Arduin...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://bitbucket.org/pjhardy/arduinosinspace/src/master/ Arduinos in Space] is an Arduino library to interface with Objects in Space. It aims to provide a high level, Arduino-like interface while still being powerful and flexible.&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduino_Librarys&amp;diff=965</id>
		<title>Arduino Librarys</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduino_Librarys&amp;diff=965"/>
				<updated>2018-07-24T08:15:04Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: /* Arduino Libraries (WIP) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Arduino Libraries (WIP)==&lt;br /&gt;
&lt;br /&gt;
* interface for the serial protocol [https://github.com/Segwegler/OIS_Library OIS Library git]&lt;br /&gt;
* [[Arduinos in Space]]. A high-level, Arduino-like interface to Objects in Space.&lt;br /&gt;
&lt;br /&gt;
[[Category:HardwareInterfacing]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Getting_started_with_hardware&amp;diff=397</id>
		<title>Getting started with hardware</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Getting_started_with_hardware&amp;diff=397"/>
				<updated>2018-06-29T12:41:00Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: tada!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You want to build an Objects in Space controller? Great! Here&amp;#039;s how to get started.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Configuring the game ==&lt;br /&gt;
&lt;br /&gt;
The hardware interface is not enabled by default. To turn it on, add the following to your [[Configuration file]] (ref: [http://forum.objectsgame.com:88/t/objects-in-space-beta-technical-notes/809 Objects in Space Beta Technical Notes])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;hardware=true&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Windows users may also want to add this option to prevent the game from scanning the hardware COM1 and COM2 ports:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ignorecom12=true&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arduinos ==&lt;br /&gt;
&lt;br /&gt;
Getting started with Arduino is way too big a topic to cover here. The [https://www.arduino.cc/en/Guide/HomePage Arduino Getting Started Guide] and [https://www.arduino.cc/en/Tutorial/HomePage Arduino Tutorial index] are a good jumping-off point. It&amp;#039;s recommended, at bare minimum, to familiarise yourself with, and understand how the BlinkWithoutDelay and Debounce example sketches work, and be able to write new sketches that use these techniques. They&amp;#039;re very important for driving basic I/O with Objects in Space.&lt;br /&gt;
&lt;br /&gt;
== The serial protocol ==&lt;br /&gt;
&lt;br /&gt;
The [[ExternalProtocol|External Protocol]] documentation includes a description of the serial protocol itself, as well as lists of the commands that are possible and data that can be requested from the game.&lt;br /&gt;
&lt;br /&gt;
== Arduino libraries ==&lt;br /&gt;
&lt;br /&gt;
A number of projects are underway to encapsulate the serial protocol and make writing code to work with the game easier. See [[Arduino Librarys|Arduino Libraries]].&lt;br /&gt;
&lt;br /&gt;
[[Category:HardwareInterfacing]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Arduino_Librarys&amp;diff=389</id>
		<title>Arduino Librarys</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Arduino_Librarys&amp;diff=389"/>
				<updated>2018-06-18T12:19:31Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Arduino Libraries (WIP)==&lt;br /&gt;
&lt;br /&gt;
* interface for the serial protocol [https://github.com/Segwegler/OIS_Library OIS Library git]&lt;br /&gt;
* [https://bitbucket.org/pjhardy/arduinosinspace Arduinos In Space]. A high-level, Arduino-like interface to Objects in Space.&lt;br /&gt;
&lt;br /&gt;
[[Category:HardwareInterfacing]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	<entry>
		<id>https://oiswiki.sysadninjas.net/w/index.php?title=Serial_Requests&amp;diff=388</id>
		<title>Serial Requests</title>
		<link rel="alternate" type="text/html" href="https://oiswiki.sysadninjas.net/w/index.php?title=Serial_Requests&amp;diff=388"/>
				<updated>2018-06-18T11:52:40Z</updated>
		
		<summary type="html">&lt;p&gt;Stibbons: Power commands&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Numeric Requests ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Numeric Requests&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Power&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;POWER_LEVEL&amp;lt;/code&amp;gt;&lt;br /&gt;
|An &amp;#039;&amp;#039;&amp;#039;integer value&amp;#039;&amp;#039;&amp;#039; showing available power as a percentage of total capacity. Note that the game currently doesn&amp;#039;t fill all batteries to capacity, so this won&amp;#039;t report higher than 99.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;POWER_DRAIN&amp;lt;/code&amp;gt;&lt;br /&gt;
|A &amp;#039;&amp;#039;&amp;#039;float value&amp;#039;&amp;#039;&amp;#039; indicating net power drain in mw. Values &amp;gt; 0 indicate net power gain, &amp;lt; 0 is a net power loss. For example, the default Ceres starter ship has a 5.00mw reactor, and idles at -1.20mw power draw. &amp;lt;code&amp;gt;POWER_DRAIN&amp;lt;/code&amp;gt; usually report 3.80.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;POWER_DRAW_PERCENT&amp;lt;/code&amp;gt;&lt;br /&gt;
|An &amp;#039;&amp;#039;&amp;#039;integer value&amp;#039;&amp;#039;&amp;#039;. Usage is unknown. Seems to reflect current power draw as a percentage of total possible draw.&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Movement&lt;br /&gt;
|-&lt;br /&gt;
|DESIRED_DIRECTION&lt;br /&gt;
|-&lt;br /&gt;
|MOTION_ANGLE&lt;br /&gt;
|The angle the ship is moving&lt;br /&gt;
|-&lt;br /&gt;
|DIRECTION&lt;br /&gt;
|The angle the ship is facing &lt;br /&gt;
|-&lt;br /&gt;
|CURRENT_SPEED&lt;br /&gt;
|-&lt;br /&gt;
|CURRENT_SPEED_PERCENT&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Nav&lt;br /&gt;
|-&lt;br /&gt;
|CURRENT_DISTANCE&lt;br /&gt;
|-&lt;br /&gt;
|ASTEROID_DENSITY&lt;br /&gt;
|-&lt;br /&gt;
|NEBULA_DENSITY&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Weapons&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_SELECTED&lt;br /&gt;
|Which weapon tube is selected&lt;br /&gt;
|-&lt;br /&gt;
|CURRENT_TUBE_SPIN_UP_PERCENT&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Misc&lt;br /&gt;
|-&lt;br /&gt;
|PRESSURE_EXTERIOR&lt;br /&gt;
|-&lt;br /&gt;
|PRESSURE_INTERIOR&lt;br /&gt;
|-&lt;br /&gt;
|PRESSURE_AIRLOCK&lt;br /&gt;
|-&lt;br /&gt;
|CURRENT_TEMPERATURE&lt;br /&gt;
|-&lt;br /&gt;
|AMOUNT_OWED_TO_DOCKED&lt;br /&gt;
|-&lt;br /&gt;
|AMOUNT_OWED_VIA_COMMS&lt;br /&gt;
|-&lt;br /&gt;
|AUTO_REPAIR_PERCENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_CURRENT_REPAIR_PERCENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_CURRENT_SPARE_PARTS&lt;br /&gt;
|Might not be in the game&lt;br /&gt;
|-&lt;br /&gt;
|ENG_MAX_SPARE_PARTS&lt;br /&gt;
|Might not be in the game&lt;br /&gt;
|-&lt;br /&gt;
|JMP_SOLUTION&lt;br /&gt;
|-&lt;br /&gt;
|MAIN_DRIVE_POWER_LEVEL&lt;br /&gt;
|-&lt;br /&gt;
|HULL_TEMPERATURE&lt;br /&gt;
|-&lt;br /&gt;
|UNREAD_EMAILS&lt;br /&gt;
|-&lt;br /&gt;
|READ_EMAILS&lt;br /&gt;
|-&lt;br /&gt;
|PLAYER_CREDITS&lt;br /&gt;
|-&lt;br /&gt;
|SOLAR_RADIATION_PERCENT&lt;br /&gt;
|-&lt;br /&gt;
|GRAPPLE_ARM_PERCENTAGE&lt;br /&gt;
|-&lt;br /&gt;
|HACK_PERCENTAGE&lt;br /&gt;
|-&lt;br /&gt;
|PENDING_EMAILS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Boolean Requests ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Boolean Requests&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Docking&lt;br /&gt;
|-&lt;br /&gt;
|NOT_DOCKED&lt;br /&gt;
|-&lt;br /&gt;
|IS_DOCKED_OR_DOCKING&lt;br /&gt;
|-&lt;br /&gt;
|IS_DOCKED&lt;br /&gt;
|-&lt;br /&gt;
|IS_DOCKING&lt;br /&gt;
|-&lt;br /&gt;
|IS_FULLY_DOCKED&lt;br /&gt;
|-&lt;br /&gt;
|IS_UNDOCKING&lt;br /&gt;
|-&lt;br /&gt;
|NOT_DOCKING&lt;br /&gt;
|-&lt;br /&gt;
|NOT_UNDOCKING&lt;br /&gt;
|-&lt;br /&gt;
|CAN_OPEN_AIRLOCK&lt;br /&gt;
|-&lt;br /&gt;
|HAS_DOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|NEEDS_DOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|HAS_UNDOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|NEEDS_UNDOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|NOT_DOCKED_OR_MULTIPLAYER&lt;br /&gt;
|-&lt;br /&gt;
|NOT_DOCKED_OR_MULTIPLAYER_OR_TUTORIAL&lt;br /&gt;
|-&lt;br /&gt;
|CAN_GET_UNDOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|CANNOT_GET_UNDOCKING_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|DOCKED_BUT_CANNOT_UNDOCK&lt;br /&gt;
|-&lt;br /&gt;
|OWES_MONEY_TO_DOCKED_STATION_AND_CANNOT_PAY&lt;br /&gt;
|-&lt;br /&gt;
|OWES_MONEY_TO_DOCKED_STATION_AND_CAN_PAY&lt;br /&gt;
|-&lt;br /&gt;
|IS_DOCKED_WITH_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|ANY_AIRLOCK_OPEN&lt;br /&gt;
|-&lt;br /&gt;
|ALL_AIRLOCKS_SEALED&lt;br /&gt;
|-&lt;br /&gt;
|AIRLOCKS_CLOSED_BUT_NEEDS_UNDOCK_PERMISSION&lt;br /&gt;
|-&lt;br /&gt;
|CAN_UNDOCK&lt;br /&gt;
|-&lt;br /&gt;
|OWES_MONEY_TO_DOCKED_STATION&lt;br /&gt;
|-&lt;br /&gt;
|IS_DOCKED_WITH_STATION&lt;br /&gt;
|-&lt;br /&gt;
|IS_DOCKED_WITH_JUMPGATE&lt;br /&gt;
|-&lt;br /&gt;
|NEED_TO_PAY_FOR_JUMPGATE&lt;br /&gt;
|-&lt;br /&gt;
|CAN_ACTIVATE_JUMPGATE&lt;br /&gt;
|-&lt;br /&gt;
|NOT_DOCKED_WITH_STATION&lt;br /&gt;
|-&lt;br /&gt;
|DOCKED_WITH_JUMPGATE&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Nav&lt;br /&gt;
|-&lt;br /&gt;
|CLUSTER_MODE&lt;br /&gt;
|-&lt;br /&gt;
|NAV_TARGET_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|HAS_SELECTED_OBJECT&lt;br /&gt;
|-&lt;br /&gt;
|HAS_SELECTED_DIRECTION &lt;br /&gt;
|True when you are pointing in the direction you are moving (not always correct)&lt;br /&gt;
|-&lt;br /&gt;
|HAS_COURSE_PLOTTED&lt;br /&gt;
|-&lt;br /&gt;
|COURSE_PLOTTED_NOT_ENGAGED&lt;br /&gt;
|-&lt;br /&gt;
|MAP_LOCKED_TO_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|MAP_IN_SECTOR_MODE&lt;br /&gt;
|-&lt;br /&gt;
|HAS_SELECTED_DESTINATION&lt;br /&gt;
|-&lt;br /&gt;
|VALID_TRAVEL_TARGET_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|CAN_ADD_WAYPOINT&lt;br /&gt;
|-&lt;br /&gt;
|IS_IN_FREE_SPACE &lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Piloting&lt;br /&gt;
|-&lt;br /&gt;
|CAN_COME_TO_FULL_STOP&lt;br /&gt;
|-&lt;br /&gt;
|CAN_ROTATE &lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|IS_MOVING&lt;br /&gt;
|-&lt;br /&gt;
|IS_STATIONARY&lt;br /&gt;
|-&lt;br /&gt;
|MAIN_ENGINE_BURNING&lt;br /&gt;
|-&lt;br /&gt;
|MAIN_DRIVE_FUNCTIONAL&lt;br /&gt;
|-&lt;br /&gt;
|AUTO_PILOT_ENGAGED&lt;br /&gt;
|-&lt;br /&gt;
|AUTO_PILOT_NOT_ENGAGED&lt;br /&gt;
|-&lt;br /&gt;
|RCS_BURNING&lt;br /&gt;
|-&lt;br /&gt;
|RCS_BURNING_CW&lt;br /&gt;
|-&lt;br /&gt;
|RCS_BURNING_CCW&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Jump Drive&lt;br /&gt;
|-&lt;br /&gt;
|JMP_CAN_SET_JUMP_DESTINATION&lt;br /&gt;
|-&lt;br /&gt;
|JMP_CAN_SPIN_UP_JUMP_DRIVE&lt;br /&gt;
|-&lt;br /&gt;
|JMP_CAN_CALC_JUMP&lt;br /&gt;
|-&lt;br /&gt;
|JMP_CAN_JUMP&lt;br /&gt;
|-&lt;br /&gt;
|JMP_CAN_DISCHARGE_JUMP_DRIVE&lt;br /&gt;
|-&lt;br /&gt;
|JMP_HAS_JUMP_DRIVE&lt;br /&gt;
|-&lt;br /&gt;
|JMP_IS_SPINNING_UP&lt;br /&gt;
|-&lt;br /&gt;
|JMP_IS_CALCULATING_JUMP&lt;br /&gt;
|-&lt;br /&gt;
|JMP_IS_SPUN_UP&lt;br /&gt;
|-&lt;br /&gt;
|JMP_IS_CALCULATED&lt;br /&gt;
|-&lt;br /&gt;
|JUMPDRIVE_ACTIVE&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Alerts&lt;br /&gt;
|-&lt;br /&gt;
|PWR_LOW_POWER_WARNING&lt;br /&gt;
|-&lt;br /&gt;
|PCE_ALARM&lt;br /&gt;
|-&lt;br /&gt;
|STATUS_WARNING&lt;br /&gt;
|-&lt;br /&gt;
|STATUS_DANGER&lt;br /&gt;
|-&lt;br /&gt;
|STATUS_NOMINAL&lt;br /&gt;
|-&lt;br /&gt;
|IN_ASTEROID_FIELD&lt;br /&gt;
|-&lt;br /&gt;
|IN_NEBULA&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Weapons&lt;br /&gt;
|-&lt;br /&gt;
|CM_EXISTS&lt;br /&gt;
|-&lt;br /&gt;
|CM_CANLAUNCH&lt;br /&gt;
|-&lt;br /&gt;
|CM_CANNOTLAUNCH&lt;br /&gt;
|-&lt;br /&gt;
|PDS_EXISTS&lt;br /&gt;
|-&lt;br /&gt;
|PDS_ACTIVE&lt;br /&gt;
|-&lt;br /&gt;
|PDS_INACTIVE&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_HAS_TORPEDO&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_HAS_MINE&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_HAS_PROBE&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_CAN_BE_ARMED”&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_CAN_POWER_DOWN&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_CAN_BE_DISABLED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_CAN_SPIN_UP&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_CAN_FIRE&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_CAN_LAUNCH&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_LAUNCHED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_EMPTY&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_SPINNING_UP&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_LINKED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_HAS_EXP&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_HAS_EMP&lt;br /&gt;
|-&lt;br /&gt;
|TARGET_AND_WEAPON_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_1_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_2_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_3_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_4_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|TUBE_5_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|CAN_SET_TARGET&lt;br /&gt;
|-&lt;br /&gt;
|CAN_CHANGE_TARGET&lt;br /&gt;
|-&lt;br /&gt;
|CANNOT_SET_OR_CHANGE_TARGET&lt;br /&gt;
|-&lt;br /&gt;
|PDL_ACTIVE&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Power&lt;br /&gt;
|-&lt;br /&gt;
|PWR_IS_DRAINING&lt;br /&gt;
|-&lt;br /&gt;
|PWR_IS_GENERATING&lt;br /&gt;
|-&lt;br /&gt;
|IS_TURNED_ON&lt;br /&gt;
|-&lt;br /&gt;
|IS_TURNED_OFF&lt;br /&gt;
|-&lt;br /&gt;
|EMCON_MODE&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CURRENT_MODULE_ON&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CURRENT_MODULE_OFF&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CURRENT_MODULE_EMCON_ON&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CURRENT_MODULE_EMCON_OFF&lt;br /&gt;
|-&lt;br /&gt;
|PWR_CURRENT_MODULE_CAN_SCRAM&lt;br /&gt;
|-&lt;br /&gt;
|PWR_REACTOR_ON&lt;br /&gt;
|-&lt;br /&gt;
|PWR_REACTOR_OFF&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Comms&lt;br /&gt;
|-&lt;br /&gt;
|IFF_ACTIVE&lt;br /&gt;
|-&lt;br /&gt;
|COMMS_AUTOSYNC_ON&lt;br /&gt;
|-&lt;br /&gt;
|BEING_HAILED&lt;br /&gt;
|-&lt;br /&gt;
|SELECTED_OBJECT_CAN_COMMUNICATE&lt;br /&gt;
|-&lt;br /&gt;
|HAS_EMAILS_TO_DOWNLOAD&lt;br /&gt;
|-&lt;br /&gt;
|SOS_ACTIVE&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Sensors&lt;br /&gt;
|-&lt;br /&gt;
|SENSORS_NAV_LINKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSORS_HISTORY_LOCKED&lt;br /&gt;
|-&lt;br /&gt;
|SENSORS_AUTO&lt;br /&gt;
|-&lt;br /&gt;
|LADAR_ACTIVE&lt;br /&gt;
|-&lt;br /&gt;
|LADAR_FUNCTIONAL&lt;br /&gt;
|-&lt;br /&gt;
|LADAR_INACTIVE&lt;br /&gt;
|-&lt;br /&gt;
|LADAR_DETECTED&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Engineering&lt;br /&gt;
|-&lt;br /&gt;
|ENG_MODULE_ON&lt;br /&gt;
|-&lt;br /&gt;
|ENG_MODULE_OFF&lt;br /&gt;
|-&lt;br /&gt;
|ENG_MODULE_CAN_OPEN&lt;br /&gt;
|-&lt;br /&gt;
|ENG_MODULE_OPEN&lt;br /&gt;
|-&lt;br /&gt;
|ENG_NO_MODULE_OPEN&lt;br /&gt;
|-&lt;br /&gt;
|ENG_CAN_CLOSE_CURRENT_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|ENG_MODULE_CAN_BE_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|ENG_NO_TRAY_OBJECT_SELECTED&lt;br /&gt;
|-&lt;br /&gt;
|ENG_CAN_REPAIR_COMPONENT&lt;br /&gt;
|-&lt;br /&gt;
|ENG_IS_REPAIRING&lt;br /&gt;
|-&lt;br /&gt;
|AUTO_REPAIR_ENABLED&lt;br /&gt;
|-&lt;br /&gt;
|AUTO_REPAIR_IDLE&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_REACTOR_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_REACTOR_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_REACTOR_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_REACTOR_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_REACTOR_FUNCTIONING&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_MAINDRIVE_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_MAINDRIVE_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_MAINDRIVE_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_MAINDRIVE_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_RCS_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_RCS_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_RCS_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_RCS_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_COMMS_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_COMMS_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_COMMS_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_COMMS_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT1_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT1_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT1_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT1_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT2_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT2_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT2_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT2_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT3_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT3_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT3_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BATT3_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_HELM_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_HELM_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_HELM_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_HELM_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_SENSORS_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_SENSORS_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_SENSORS_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_SENSORS_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_NAVCOM_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_NAVCOM_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_NAVCOM_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_NAVCOM_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_WEAP_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_WEAP_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_WEAP_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_WEAP_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_JUMPDRIVE_UNDAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_JUMPDRIVE_DAMAGED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_JUMPDRIVE_DESTROYED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_JUMPDRIVE_CONNECTED&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_BOOTING&lt;br /&gt;
|-&lt;br /&gt;
|MODULE_DISCONNECTED&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Misc&lt;br /&gt;
|-&lt;br /&gt;
|IS_IN_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_IN_STANDARD_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_IN_HIGH_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_IN_POLAR_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|NOT_IN_STANDARD_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|NOT_IN_HIGH_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|NOT_IN_POLAR_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_CHANGING_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_LEAVING_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_ENTERING_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_CORRECTING_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_IN_STABLE_ORBIT&lt;br /&gt;
|-&lt;br /&gt;
|SHOW_SPACE_DISC&lt;br /&gt;
|-&lt;br /&gt;
|DONT_SHOW_SPACE_DISC&lt;br /&gt;
|-&lt;br /&gt;
|CAN_TELEPORT&lt;br /&gt;
|-&lt;br /&gt;
|IS_MOORED&lt;br /&gt;
|-&lt;br /&gt;
|IS_MOORED_TO_DEBRIS&lt;br /&gt;
|-&lt;br /&gt;
|IS_MOORED_TO_CARGO&lt;br /&gt;
|-&lt;br /&gt;
|HAS_GRAPPLING_ARM&lt;br /&gt;
|-&lt;br /&gt;
|GRAPPLING_ARM_IN_USE&lt;br /&gt;
|-&lt;br /&gt;
|CAN_GRAPPLE_MOORED&lt;br /&gt;
|-&lt;br /&gt;
|CAN_GRAPPLE_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|CAN_JETTISON&lt;br /&gt;
|-&lt;br /&gt;
|CAN_JETTISON_ALL&lt;br /&gt;
|-&lt;br /&gt;
|CAN_HACK&lt;br /&gt;
|-&lt;br /&gt;
|CANNOT_HACK&lt;br /&gt;
|-&lt;br /&gt;
|HAS_HACKING_UNIT&lt;br /&gt;
|-&lt;br /&gt;
|IS_HACKING&lt;br /&gt;
|-&lt;br /&gt;
|SHOULD_SHOW_CARGO_SCREEN&lt;br /&gt;
|-&lt;br /&gt;
|CAN_REPAIR_HULL_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CANNOT_REPAIR_HULL_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CAN_REPAIR_MODULES_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CANNOT_REPAIR_MODULES_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CAN_REARM_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CANNOT_REARM_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CAN_BUY_CM_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CANNOT_BUY_CM_AT_DEPOT&lt;br /&gt;
|-&lt;br /&gt;
|CAN_JUMP_IN_TUTORIAL&lt;br /&gt;
|-&lt;br /&gt;
|CAN_DETECT_CASSANDRA&lt;br /&gt;
|-&lt;br /&gt;
|SUBMENU_OPTIONS&lt;br /&gt;
|-&lt;br /&gt;
|SUBMENU_INPUT&lt;br /&gt;
|-&lt;br /&gt;
|SUBMENU_NEWS&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_HASPURCHASE&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_VALIDPURCHASE&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_INVALIDPURCHASE&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_HASSALE&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_VALIDSALE&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_INVALIDSALE&lt;br /&gt;
|-&lt;br /&gt;
|TRADE_HASPURCHASEORSALE&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_ATMENU&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_NOTATMENU&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_MENUIS&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANPURCHASELICENSE&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANNOTPURCHASELICENSE&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_LOANGIVERSELECTED&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_LOANGIVERNOTSELECTED&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_REPAYINGLOAN&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_LOANVALID&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_LOANINVALID&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_REPAYMENTVALID&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_REPAYMENTINVALID&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANTAKECONTRACT&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANNOTTAKECONTRACT&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANTAKEPASSENGER&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANNOTTAKEPASSENGER&lt;br /&gt;
|-&lt;br /&gt;
|WIRE_VISIBLE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_ATMENU&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_AT&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_REPAIR&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_REPAIR&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_BUY_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_BUY_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_SELL_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_SELL_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_UPGRADE_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_UPGRADE_POD&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_BUY_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_BUY_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_SELL_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_SELL_MODULE&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_BUY_ARMAMENT&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_BUY_ARMAMENT&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CAN_SELL_ARMAMENT&lt;br /&gt;
|-&lt;br /&gt;
|MECHANIC_CANNOT_SELL_ARMAMENT&lt;br /&gt;
|-&lt;br /&gt;
|SHIP_CANBUY&lt;br /&gt;
|-&lt;br /&gt;
|SHIP_CANNOTBUY&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_WRECK_HAS_NOT_DOWNLOADED_DATA&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_WRECK_HAS_DOWNLOADED_DATA&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_WRECK_HAS_UNCLAMPED_CARGO&lt;br /&gt;
|-&lt;br /&gt;
|MOORED_WRECK_HAS_NOT_UNCLAMPED_CARGO&lt;br /&gt;
|-&lt;br /&gt;
|CAN_BOARD_BROKER_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|CAN_NOT_BOARD_BROKER_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|IS_VIEWING_SELECTED_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|IS_NOT_VIEWING_SELECTED_SHIP&lt;br /&gt;
|-&lt;br /&gt;
|STARTING_NEW_GAME&lt;br /&gt;
|-&lt;br /&gt;
|CONVERSATION_ACTIVE&lt;br /&gt;
|-&lt;br /&gt;
|MUSIC_PLAYING&lt;br /&gt;
|-&lt;br /&gt;
|MUSIC_NOT_PLAYING&lt;br /&gt;
|-&lt;br /&gt;
|CAN_USE_MUSIC&lt;br /&gt;
|-&lt;br /&gt;
|SHIP_DISABLED&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANTAKEBOUNTY&lt;br /&gt;
|-&lt;br /&gt;
|COMMERCE_CANNOTTAKEBOUNTY&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:HardwareInterfacing]]&lt;/div&gt;</summary>
		<author><name>Stibbons</name></author>	</entry>

	</feed>