Difference between revisions of "ExternalProtocol"
(→Protocol Details) |
m (→Protocol Details: the compiler sets char encoding, not the runtime.) |
||
Line 11: | Line 11: | ||
To connect your controller to the game you need to send 451 with a newline at the end. The game will send back 452. (source [http://forum.objectsgame.com:88/t/ois-arduino-code-during-beta/911/13 Nocturnal]) | To connect your controller to the game you need to send 451 with a newline at the end. The game will send back 452. (source [http://forum.objectsgame.com:88/t/ois-arduino-code-during-beta/911/13 Nocturnal]) | ||
− | Also, contrary to the documentation, the newline character is LF (Dec: 10, Hex 0x0A), not CR (Dec: 13, Hex 0x0D). (note: Most C | + | Also, contrary to the documentation, the newline character is LF (Dec: 10, Hex 0x0A), not CR (Dec: 13, Hex 0x0D). (note: Most C compilers encode <code>'\n'</code> as LF (CR would be <code>'\r'</code>), so the sample codes provided is correct, just the description on the page is wrong). |
[[Category:HardwareInterfacing]] | [[Category:HardwareInterfacing]] |
Revision as of 02:54, 3 June 2018
Objects in space was made with the intention that it could be playable with just buttons.
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.
There are 193 Commands Serial Commands, 164 Boolean Requests, and 24 Numeric Requests for a total of 381
Protocol Details
The protocol is outlined on the offical web site, however there are some minor inaccuracies whilst the game is in Beta.
To connect your controller to the game you need to send 451 with a newline at the end. The game will send back 452. (source Nocturnal)
Also, contrary to the documentation, the newline character is LF (Dec: 10, Hex 0x0A), not CR (Dec: 13, Hex 0x0D). (note: Most C compilers encode '\n'
as LF (CR would be '\r'
), so the sample codes provided is correct, just the description on the page is wrong).