Jump to content

Arduino Addon for Mac


cyoung_mi

Recommended Posts

  • 5 weeks later...

This stuff is pretty new to me so its taking a little time.

I have an external program running that communicates with KSP and renders a navball.

From this program I will communicate with the arduino. Some basic communication is now happening, but my noobishness at arduino programming is slowing things down. There will be coder to share shortly!

Link to comment
Share on other sites

  • 3 months later...

I'm also really interested in seeing this working. Unfortunately I'm a knowledgable amateur at all this at best. Could it be possible to somehow salvage the Arduino IDE code? (Probs not since it's not C#)

Something else that might be interesting is this but I have no idea if or how that could help us here.

Looks like this guy got it to work, unfortunately he want's money for it...

Link to comment
Share on other sites

OK, I made some progress. The road I'm taking is using Firmata on the Arduino to control the Arduino using Processing and then communicating with KSP via oscP5... which is where I got stuck. Might have something to do with me being a noob at this or maybe with all the alcohol I had last night, but I can't seem to find out how to make a plugin for KSP that is able to communicate with Processing over oscP5. Can anyone give me a push in the right direction?

Link to comment
Share on other sites

Hi Guys,

I have been messing around with this all weekend. and I almost have something working. Can someone test this and see if it works for you?

https://github.com/unixunion/PsimaxSerial

Can someone please test it? Im at work and really want to know if its working now. I need to know!!! :D

/K

Edited by marzubus
Link to comment
Share on other sites

Might have something to do with me being a noob at this or maybe with all the alcohol I had last night, but I can't seem to find out how to make a plugin for KSP that is able to communicate with Processing over oscP5. Can anyone give me a push in the right direction?

Interesting! I like the idea of using Firmata on the arduino side. If you're planning on continuing with this, you might like to consider writing your Processing side as an HTTP client and interface it with an existing mod like Telemachus?

- - - Updated - - -

I have been messing around with this all weekend. and I almost have something working. Can someone test this and see if it works for you?

Woah, nice work! I'll have a look and see how this runs on Win, OSX and Linux soon.

Link to comment
Share on other sites

Interesting! I like the idea of using Firmata on the arduino side. If you're planning on continuing with this, you might like to consider writing your Processing side as an HTTP client and interface it with an existing mod like Telemachus?

That's a pretty good idea, but I think for now marzubus made the race :sticktongue: so, I think I'm going to play around with that before I continue my approach.

Link to comment
Share on other sites

Hi Guys!

I have done a quick mod of KSPSerialIO to use my serial library and it works for me on my Mac.

I have pushed a version of KSPSerialIO to https://github.com/unixunion/KSPSerialIO there are mac binaries in release subdir for you binary huggers.

Can someone try compile and run it on Win / Linux?

Give it a whirl and let me know.

/Kegan

Link to comment
Share on other sites

Hi Guys!

I have done a quick mod of KSPSerialIO to use my serial library and it works for me on my Mac.

I have pushed a version of KSPSerialIO to https://github.com/unixunion/KSPSerialIO there are mac binaries in release subdir for you binary huggers.

Can someone try compile and run it on Win / Linux?

Give it a whirl and let me know.

/Kegan

Hey do you have a direct link to the mac/linux binaries I can link to in the first post?

Link to comment
Share on other sites

Good to hear Midnitemax! The code is based on Zitron's master branch, so it's likely some things are moved around. Can you elaborate what is different and if you updated your sketch to use the current structs as in the source?

/K

Link to comment
Share on other sites

  • 2 months later...

I didn't have any time/motivation to do anything regarding this the last couple of months and for some reason now it's not working anymore :-/ It seems to connect OK when I load a vessel but it's not reacting to any inputs from the Arduino nor are there any outputs. Anyone got an idea what this could be?

Link to comment
Share on other sites

This is amazing. If you need any help i will be glad to lend a hand. i may just slow you down but i will still help as much as i can. would you mind if i made a tutorial series and published it here about how to use this mod with arduino to control rockets? if it's ok with the mod dev(s) only then i will do it.

- - - Updated - - -

GREAT MOD. I AM SHOCKED that i haven't heard about it until now.

Link to comment
Share on other sites

This is amazing. If you need any help i will be glad to lend a hand. i may just slow you down but i will still help as much as i can. would you mind if i made a tutorial series and published it here about how to use this mod with arduino to control rockets? if it's ok with the mod dev(s) only then i will do it.

I don't see why it wouldn't be OK! It's less work for us!

Link to comment
Share on other sites

midnitemax

Did you come right? Or what is not working any more?

Update, there has been a bump in the protocol's between the arduino and the KSPSerialIO module, so please check you are running the latest version and latest Demo10 based structures.

Edited by marzubus
Link to comment
Share on other sites

midnitemax

Did you come right? Or what is not working any more?

Update, there has been a bump in the protocol's between the arduino and the KSPSerialIO module, so please check you are running the latest version and latest Demo10 based structures.

Not sure what you're trying to say with "did I come right" :-/ anyway, it's just not working anymore. My test setup right now consists of the Arduino with a push button on the SAS pin defined in Demo10. Also, I just downloaded everything new and commented out all the display stuff in Demo10 so it would compile. Right now I'm testing on KSP 1.0 and it's not even saying "No display found" anymore, but I still have a couple of old versions of KSP lying around if that might be the problem, but it was even on 0.90.

Thanks for the help, by the way, and thanks for an awesome mod (even if it's not working for me right now)

@agent_0004: how's it working for you, you seem to be a newbie to this, too, no disrespect :-)

Link to comment
Share on other sites

Well, at least in "my" Demo10 this is what the head looks like


#include <SPI.h>
#include <Wire.h>
//#include <Adafruit_GFX.h>
//#include <Adafruit_SSD1306.h>
#include <u8glib.h>
#include <pgfx.h>
#include <MemoryFree.h>

So I need to comment out everything that has to do with the display, but that doesn't really matter anyway since I'm far from hooking up a display, anyway.

Link to comment
Share on other sites

  • 2 months later...

Kerbalstuff says this is stuck on 0.90? Has this/will this be updated for 1.0.4?

I'm building a Kerbal "Kommand Module" controller, but also run on a Mac. Also, are the attitude values and vector indicator values transmitted (aka, the navball data)? I have an FDAI (Flight Director/Attitude Indicator) that I REALLY want to connect to KSP. To use it, I'll need the roll, pitch, and yaw angle of the vessel relative to the orbited body, as well as the angle of the various vector indicators (maneuver node, target, prograde, normal, radial, etc).

I don't know if it's better to math the "anti/retro" values in the arduinos, or just transmit everything over USB... It's already gonna be hard enough to generate a 400 Hz sine wave and 9 amplitude modulated copies of that wave to emulate the three synchro transmitters required to drive the FDAI hardware. I don't even know if an arduino CAN do that! It might be easier to have an arduino command 9 digital potentiometers, and feed it an externally generated 400 Hz sine wave. At least then it's not responsible for that too. I can just feed the outputs into 10 amplifiers to get the 115 volts, 400 Hz AC signals to drive my navball.

Link to comment
Share on other sites

It should run OK, but the last time I checked on github it was one or two releases behind, so won't work properly with arduino code written for zitronen's current release.

I use a Mac laptop for my development work, so will need this soon. If marzubus isn't around to update it in the next couple of weeks I'll be running my own merged fork for a little while, that I'd be happy to share.

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...