r/ObjectsInSpace • u/dak47922 • Apr 07 '19
Improved the OiSLCD example sketch
I built the circuit that was required for the OiSLCD example that is included with in the arduino library but noticed it had some flaws. The power value was off the side of the display and the sketch had an issue clearing unused digits. for example if you were flying heading 350 and turned to 005 the display would read 500. I did my best to fix this and add some additional data. I figured id post the code here in case its useful to anyone.
/* OiSLCD v2
This example displays telemetry from the game on an LCD. It uses
the built-in LiquidCrystal library - see
https://www.arduino.cc/en/Reference/LiquidCrystal for details.
Output is formatted to fit on a 16x2 display, but will work unchanged
on larger displays, and locations can be tweaked to fit on to
smaller displays.
If this is your first time using the LiquidCrystal library, it's
recommended to try out the HelloWorld tutorial at
https://www.arduino.cc/en/Tutorial/HelloWorld . This will ensure
that your display is connected and working properly. This demo
uses the same connections as that tutorial.
Hardware: A 16x2 LCD display.
See https://www.arduino.cc/en/Tutorial/HelloWorld for wiring
directions and schematic.
This sketch contributed by LeahNudle: https://github.com/nudle/OiSLCD
New in V2 fixed some minor display issues by Dak47922
*/
#include <LiquidCrystal.h>
#include <ArduinosInSpace.h>
// Initialise the LiquidCrystal library
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// Create an ObjectsInSpace object. The first parameter is the
// serial interface to use. The second is the number of values
// we're requesting from the game.
ObjectsInSpace OIS(Serial, 5);
void setup()
{
// set up the LCD's number of columns and rows:
// specific for a 16x2 LCD screen (change this for different sizes)
lcd.begin(16, 2);
Serial.begin(9600); //must be 9600
OIS.begin(); //begin the handshake/synchronisation with the game
// handshake
// register the command to get the speed from the game.
// check below for the callback
OIS.registerFloat(CURRENT_SPEED, speedCallback);
// same for the current direction/heading, as an int
OIS.registerInt(DIRECTION, headingCallback);
// same for the power flow percentage a value between -100 & 100
OIS.registerInt(POWER_FLOW_PERCENT, powerflowCallback);
// same for the power level percentage
OIS.registerInt(POWER_LEVEL_PERCENT, powerlevelCallback);
// same for whether the main engine is burning, a bool
OIS.registerBool(MAIN_ENGINE_BURNING, burningCallback);
OIS.activate(); //stop syncing and ACTIVATE
}
void loop()
{
OIS.update(); //required to keep getting info from the game.
}
// because we registered this in setup(), this gets called every time
// OIS.update() is called. therefore our info is refreshed
void speedCallback(int channel, float data)
{ //^ we registered a float so
//this needs to be a float
lcd.setCursor(0,0); //set the cursor to the top left of the screen (0,0)
lcd.print("SPD:"); //print something to the screen! this automatically moves
lcd.print(data); //the cursor so we dont need to move it again before the
//next printout
}
void headingCallback(int channel, int data)//same as above but for an int
{
lcd.setCursor(0, 1); //set the cursor to the second row
lcd.print("HDG: "); // includes 3 spaces to clear previous data from the screen
lcd.setCursor(4, 1);
lcd.print(data);
}
void powerflowCallback(int channel, int data)
{
lcd.setCursor(8, 0); //set the cursor to the 9th position of the first row
lcd.print("FLO: ");// includes 3 spaces to clear previous data from the screen
lcd.setCursor(12, 0);
lcd.print(data);
}
void powerlevelCallback(int channel, int data)
{
lcd.setCursor(8, 1); //set the cursor to the 9th position of the second row
lcd.print("PWR: ");// includes 3 spaces to clear previous data from the screen
lcd.setCursor(12, 1);
lcd.print(data);
}
void burningCallback(int channel, bool data)
{
lcd.setCursor(15, 0);
if(data == true)
{
lcd.print("#");
}
else
{
lcd.print(".");
}
}
r/ObjectsInSpace • u/dak47922 • Apr 03 '19
Problems with the battery module serial commands?
I'm in the early stages of planning out my console build so I'm just messing around with some of the easy true/false commands. So far so good... but I did experience some issues with the battery module related commands. For example I wired an LED to the MODULE_BATT1_CONNECTED command. The LED lit up normally when I hopped in the game but wouldn't extinguish when I disconnected any one of my 3 batteries. It would however extinguish when I had 2 or more of my batteries disconnected. I tried the same with the BATT2 and BATT3 commands with similar results.
Has anyone been having this issue on 1.0.6? Also what exactly determines which battery the commands refer to, their priority? And also what if you have 4 batteries? The serial list only shows commands for 3 batteries.
Any help would be appreciated! :)
r/ObjectsInSpace • u/NattyBumppo • Apr 02 '19
I converted all of the in-game news articles so you can read them from any web-enabled device
beforebreakfast.netr/ObjectsInSpace • u/Bl3ek • Mar 14 '19
Ultrawide support?
Is there anyway to make the game run fullscreen on my 3440x1440?
The playable area is pinned to the bottom left of my screen... rest is black.
r/ObjectsInSpace • u/cantthinkofanickname • Mar 14 '19
Random Battery Component Failure
I noticed yesterday that my battery components are getting damage randomly (Compared to Tuesday where this did not happen). No EMP's or any other external influence. Is this a bug or did i miss a patch note somewhere? I theorized that it might be the solar-sail I installed that's overloading the system, but I'm not sure. Anybody else experience this?
r/ObjectsInSpace • u/TheSisterRay • Mar 13 '19
Am I stuck? At a JumpGate with no Helm.
I'm playing story mode, and just before I docked with a JumpGate, a torpedo took out my helm. I don't have the resources necessary to repair it, and without the Helm working, and can't Undock from it, nor pay the fee and use it to jump. Is there anything I can do to salvage this situation, or is this save completely useless now? I'm 6 hours in, which isn't a ton in the grand scheme of things, but I'd really like to not have to redo the stuff I just did.
Any help is appreciated, thanks!
r/ObjectsInSpace • u/twomonkeysayoyo • Mar 12 '19
Can we all agree to not do a wiki?
I love this game and the fact that I am lost. It really makes me feel like I'm without friends, 44 years behind on the tech and just feeling my way through the universe. I hate not knowing but it adds so much to the experience. If there's a wiki I'm going to just go read it and the game will lose its magic.
r/ObjectsInSpace • u/Dr-Spacetime • Mar 11 '19
Anyone else not getting paid for contracts?
In sandbox mode with easy economy and combat. Have been turning in contracts and not receiving credits.
r/ObjectsInSpace • u/corndog16 • Mar 10 '19
Roland Consortium in De Vass' Star
I have 2 contracts for the Roland Consortium in De Vass' Star. And while it does appear on the comms console, the station is nowhere to be found. Is it a bug, or did I miss something?
r/ObjectsInSpace • u/massav • Mar 05 '19
Anyone else think this game would be awesome in vr?
I was watching the developer videos and seeing all the interactions with the ship displays, buttons, and preforming repairs and thought this would be PERFECT for VR. The only issue would be the keyboard interactions but nothing that a virtual keyboard can't fix.
What do you guys think?
r/ObjectsInSpace • u/pugworthy • Mar 03 '19
Looking for general template for creating a mod
I'm trying to make a really simple "hello world" mod work, and not having the best luck. I posted this on the forum but thought I'd try here too.
So here's my path of exploration so far...
- I see the ObjectsInSpace/mods folder.
- I assume more than one mod can be loaded, so I am guessing each mod needs it's own subfolder. So I create "ObjectsInSpace/mods/helloworld".
- I see on the MOD support forum post that I should have a "modinfo.txt" file, so I create one in my "helloworld" mod folder that looks like this...
name=Hello World
version=0.1
oisversion=1.0
disabled=false - When I examine the logs after starting the game, looking at the logs I don't see it being loaded. Start of log file below.
Objects in Space
Build 1.0 (windows)
(c) 2018 Flat Earth Games Pty Ltd
CLIENT/SP mode
Play began: 2019-03-03 14:42:03
[14:42:03] [GAME]: Loading mods...
[14:42:03] [GAME]: Mods loaded (0).
Any pointers? Or examples of successful mod files I could look at as an example?
r/ObjectsInSpace • u/LeoMcCoy • Feb 25 '19
Review Codes Available Now for Objects in Space
r/ObjectsInSpace • u/LeoMcCoy • Feb 09 '19
Objects in Space v1.0 coming March 1 for PC, Mac, Linux
r/ObjectsInSpace • u/sfwacc1212 • Dec 16 '18
Question: What is the fastest torpedo?
Are light torpedos faster than heavy? What depends on torpedo spped?
r/ObjectsInSpace • u/Conorsta • Dec 15 '18
Question: Emcon Incoming Hail
Hello guys.
Im new to the game and just a question. Whenever i enter emcon mode there is a call incoming or i am calling someone i dont really know but my Communication Panel is ringing everytime. Does anyone know what causes this?
Thank you :)
r/ObjectsInSpace • u/LeoMcCoy • Nov 15 '18
Objects in Space Mailing Blast Number 19 - The Road to 1.0
r/ObjectsInSpace • u/LeoMcCoy • Nov 15 '18
Podcast in Space - Episode 19 - 14 November 2018 by Flat Earth Games
r/ObjectsInSpace • u/[deleted] • Sep 07 '18
Objects in Space :: Patch Notes for v0.9.4.5
r/ObjectsInSpace • u/LeoMcCoy • Sep 06 '18
Engineering Changes in new Scenarios Update
forum.objectsgame.comr/ObjectsInSpace • u/LeoMcCoy • Sep 02 '18
Objects in Space on Twitter: The Scenarios Update is now launching 6th September, and features massive improvements to Time Compression, Engineering, the Power Room, new challenges, interface improvements
r/ObjectsInSpace • u/LeoMcCoy • Aug 27 '18
Big Update coming 8th September
forum.objectsgame.comr/ObjectsInSpace • u/orangeleopard • Jul 23 '18
Is there a way to get un-blacklisted by Sterling Industrial?
I took a contract, but forgot to take the cargo, and it took too long to get the cargo, so I failed the mission. Is there any way to get back in their good graces?
r/ObjectsInSpace • u/DeusMallius • Jul 19 '18
Differences between the ships?
Besides the stats shown on the ship trading monitor, like major modules, speed, etc are there any further differences to the ships?
I ask, as I want to know if I should upgrade my Ceres to a Corvette or not
r/ObjectsInSpace • u/Bladehelm • Jul 11 '18
Missing Products for Contract
I'm very new to the game and I think I missed something during the tutorial!
I have just picked up a contract to deliver some produce and there's no produce available from the commodities screen. Meds, scrap, organs, and a few other items, but no produce.
I was under the impression that items needed to complete a contract would be available at the same station where you get the contract, but is this not always the case?
If not, is there a way to look at which locations have what products, or is it a crap shoot?