Jump to content

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


zitronen

Recommended Posts

Glad you figured it out in the end. :) But CKAN definitely has the most recent plugin; I switched from my local development build to the CKAN version as soon as hakan updated the entry. Have you updated your local registry recently?

Link to comment
Share on other sites

I have a few problems :

I dont know where i must put the plugin in the KSP-folder and i dont know how which code of the four of the demo is the right one....

please help

(Sorry for my bad english...)

The plugin goes into the GameData folder, similar to other mods.

For the Arduino code, if you open KSPIODemo10.ino (and you are using the Arduino IDE), you should see other "tabs" that contain the other ino files. When you compile and upload to the Arduino, they are all uploaded.

Link to comment
Share on other sites

I'm having trouble getting the tutorial code to work from the first post. When I go to the launch pad, the RX LED on the arduino will start rapidly blinking. It says "Starting serial port COM3" at the bottom right corner of the screen and the log says: KSPSerialIO: Handshake received - 314. But none of the 3 LEDS ever turn on.

This is how it's connected up:

http://i.imgur.com/SrPqLGs.jpg

I've confirmed all 3 LEDs work using the basic Blink arduino sketch.

Any ideas what's going on?

Good to see you got it working! For future reference, if you are getting the handshake reply but not getting any data, it usually means you found the right COM port, everything is working but there is something wrong with the packet. This is typically caused by plugin and arduino code version miss match. This must have happened 3 or 4 times in this thread, I should probably put something in the first page.

Link to comment
Share on other sites

  • 2 weeks later...

Is there any date on when the ability to go to map view might be added in?

EDIT: And maybe the ability to see what celestial body i am on/above/orbiting

I would love to be able to change this.

Edited by FewCode
Link to comment
Share on other sites

Is there any date on when the ability to go to map view might be added in?

EDIT: And maybe the ability to see what celestial body i am on/above/orbiting

I would love to be able to change this.

I'm waiting for 1.0 to hit before making any more changes. I have a feeling that lots of things will need changing.

Link to comment
Share on other sites

Great news! :D

EDIT: preflight checks for my panel were all solid, and I've had a few successful missions. One spectacularly unsuccessful mission as well, but we're currently blaming Jeb for that.

Edited by stibbons
Link to comment
Share on other sites

Ok lads, I need some help, I run the demo sketch as im a noob and the lights do what they should but the throttle stays on ?? What am i missing here? I have uploaded a video to explain more clearly :s

http://youtu.be/fqHBytZCogk

It's hard to see from you video, but are you using an analog pot for throttle?

If you are not, just set throttle enable to 0 in the config xml file.

Link to comment
Share on other sites

On launchpad, the rocket starts halfway throttled up. Default config is that your controller overrides iff default controls are at zero. So throttle down to zero on the keyboard and see if it helps. Then, in ..\gamedata\KSPserialIO\plugindata? there is a config file. Open it and change <int name="ThrottleEnable">2</int> to <int name="ThrottleEnable">1</int>. It disables the keyboard throttle and always uses your controller.

Link to comment
Share on other sites

Having a look now, Thanks stibbons

:EDIT: Awesome, now to learn how to expand on that. I think next on the list is getting the Yellow indicator to turn off once the red indicator fires as it would no longer be necessary to have this on at that point :)

Edited by Kerbal007
Link to comment
Share on other sites

I think that 0 might be a better default for the throttle than 2. It's the "least harm" option.

I'm pretty sure we defaulted it to 2 because someone complained that analogue throttle wasn't working :).

Is any one having any problems at all with 1.0? I've started my career mode, seems ok so far. If every thing is working I will look into adding SOI names next. I'm still thinking sending full name char array, since they haven't added any new planets.

Link to comment
Share on other sites

@zitronen: I am all good after a couple of hours of play, only need some recoding once I get a better knowledge of the new drag model. Looking forward to SOI names.

@Kerbal007: Welcome, share your ideas and questions, we learn a lot from each other in this thread.

Link to comment
Share on other sites

@Kerbal007: Welcome, share your ideas and questions, we learn a lot from each other in this thread.

Hmm, ïf you put it like that, then let me share something that's been on my heart for a little while.

I wanna learn arduino. Really bad. But i really suck at coding. All the coding/C++ i can do, is copy templates from a book into Arduino Sketch ... Oh yeah, and if there is some code, where numbers like timing and such comes in play, i do understand that quite easily, for some odd reason, but that's about it really.

But what i also have that might help, is an Arduino Starter Kit, that comes equipped, with what i can only assume is just plenty enough, to get started on my own KSP hardware, and hopefully, learn something about it too as well.

tl;dr, i'm too stupid to arduino currently, where do i start?

Link to comment
Share on other sites

Do a truckload of example sketches and try to change little things in them first. Try to guess the meaning of the words you are writing and how you can do something a little bit different. Learn how to use a switch. Then learn how to use a switch to assign a value. Learn how to use a potmeter, and how to do simple math in Arduino C so you can assign that value. Then try to change something simple in zitronens code. It is quite a road if you start from scratch, but a highly rewarding summer could await you.

I don't know the contents of the starter kit, but a breadboard, switches, a couple of LEDs and 1k resistors, and a slide or rotary potmeter goes an extremely long way.

Programming is all about breaking complex bits into simple bits, and then solve them one by one. If you read zitronens code, it is rather user friendly in form documentation on how to change simple things. And if you can ask a specific question, some of the gurus around here are very friendly and helpful.

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