Jump to content

[Hardware, Plugin] Arduino based physical display + serial port io+ tutorial (24-11-19)


zitronen

Recommended Posts

Can you add a variable to the output stream for X rot torque, Y rot torque, and Z rot torque? I'm making a simulator cockpit thing and want to have XYZ torque indicators like inside the game cockpits or the bottom left corner of the screen that shows trim. The problem I have is the arduino can output the joystick input but if I turn on SAS, the indicators will stay blank.

Just a request; Ignore it if have better things to do.

You mean the SAS control demands or the actual torque force on the craft?

I am afraid I jumped the gun. I checked out in sandbox, as I had no save in career yet. No problems. In carrer, however, I got the error:

[Exception]: NullReferenceException: Object reference not set to an instance of an object

Repeating over and over. Ship was a capsule, decoupler, couple of FT-L tanks and a LV-T30

Yeah I'm having the same problem, looking into it now...

Link to comment
Share on other sites

Ah.. ok so it's caused by us trying to get the maneuver node info when it's not unlocked... So it should work once you have it unlocked! I wonder if there are more issues like this...

The current work around is to unlock the second stage tracking station in career mode. I guess that's realistic?

Link to comment
Share on other sites

In other news...

After reading this: http://forum.kerbalspaceprogram.com/threads/102825-FlightInputHandler-RCSLock-RCS-state It turns out that to get the status of your controls (RCS, SAS, etc.) you can just use ActiveVessel.ActionGroups[KSPActionGroup.RCS] after all... Too easy? I swear I tried this before! It seems to work though. So I guess status indicators will be coming in the next update.

Sorry for the inconvenience of having to re-wire panels and what not... :(

Link to comment
Share on other sites

Thanks for the speedy update for 0.90. I had to unplug my controller dabbling with the beta the other night, and it was awful. ;)

I know right :cool:. I'm so used to it I can launch into a perfect geosynchronous orbit without even looking at the map using my display and controller!

Link to comment
Share on other sites

In other news...

After reading this: http://forum.kerbalspaceprogram.com/threads/102825-FlightInputHandler-RCSLock-RCS-state It turns out that to get the status of your controls (RCS, SAS, etc.) you can just use ActiveVessel.ActionGroups[KSPActionGroup.RCS] after all... Too easy? I swear I tried this before! It seems to work though. So I guess status indicators will be coming in the next update.

Sorry for the inconvenience of having to re-wire panels and what not... :(

Mine is going down for rebuild in the near future anyway, will definitly keep this in mind. Thanks for your fast reaction on the update.

Link to comment
Share on other sites

I know right :cool:. I'm so used to it I can launch into a perfect geosynchronous orbit without even looking at the map using my display and controller!

Oh that's nice. My goal is to be able to do an instrument landing on the Mun, with the monitor switched off. Still a ways off though.

Link to comment
Share on other sites

Oh that's nice. My goal is to be able to do an instrument landing on the Mun, with the monitor switched off. Still a ways off though.

Holy crap! If you pull that off I want a vid... erm... nevermind.

Actually I would like a video of that. Just because you can't see doesn't mean we can't :)

Link to comment
Share on other sites

Too easy? I swear I tried this before! It seems to work though. So I guess status indicators will be coming in the next update.

STOP TALKING EATING SLEEPING WHATEVER YOU ARE DOING AND START CODING :sticktongue:

Nah, seriously, it's extremely cool that you found a way to send the proper signals.

Sorry for the inconvenience of having to re-wire panels and what not... :(

No Prob, I'm still waiting for a delivery of switch buttons, after which everything has to be rebuilt (again) anyway...

Link to comment
Share on other sites

So this is really the smallest of things but it irks me quite a lot so I'll post it anyway. In CKAN this mod is lacking a T at the start of the description. I'm not sure if I should mention that in this thread or in CKAN thread so I'll just post it here and hope it's right :)

Link to comment
Share on other sites

So this is really the smallest of things but it irks me quite a lot so I'll post it anyway. In CKAN this mod is lacking a T at the start of the description. I'm not sure if I should mention that in this thread or in CKAN thread so I'll just post it here and hope it's right :)

Oops I blame copy paste, T is fixed now.

Link to comment
Share on other sites

STOP TALKING EATING SLEEPING WHATEVER YOU ARE DOING AND START CODING :sticktongue:

Nah, seriously, it's extremely cool that you found a way to send the proper signals.

No Prob, I'm still waiting for a delivery of switch buttons, after which everything has to be rebuilt (again) anyway...

I'm going on holiday next week, will start working on it again next year. :sticktongue:

Link to comment
Share on other sites

Finally at a stage where I have re-started my project! Got a lot of catching up to do.

Electrical components arriving over the next few weeks to begin my readout panels (2 new control panels) and re-work my switch panel. I'll be bothering you for info in the new year!

Quick question - with the addition of the new SAS features in 0.90 such as the new prograde/retrograde "autopilot" that is in the stock game, is it possible to include these as functions in your plugin? Would be great for my autopilot panel if I could simply have switches set up for prograde etc.

Link to comment
Share on other sites

I've been swapping between Leonardo, Uno and Mega boards quite a bit while developing stuff, never had any problems what weren't just because of my lousy code. :)

It could be worth checking to make sure that the drivers for your board are still OK and that it's appearing as a serial connection. And I did find that setting a default serial port in KSPSerialIO's config file helped when I was unplugging / replugging the arduino to upload new code without restarting the game.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...