Jump to content

KK4TEE

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by KK4TEE

  1. Sure thing! I've added the .craft to my github repository. I've also gone ahead and tidied up a lot of my code (though parts of it still need a lot of work) and gotten it to work with FAR. Here's a video of the latest iteration: Updated github: https://github.com/KK4TEE/kOSPrecisionLand
  2. Ah thank you! I'm working on an updated version for real solar system version and this will be helpful. I assume that I will manually have to start the code for each kOS unit, and by that I mean "RUN lowerstage.ks" on one and "RUN upperstage.ks" on the other. Is that correct?
  3. Yeah, I'm really excited about the launch today I've been keeping up with the events on reddit's SpaceX page and plan on watching the stream. Haha fair enough with mechjeb. If you ever decide to get into kOS or learn more about how it works I've also made a on youtube. Here's the first episode if you're interested:
  4. Thanks! Yep, it's completely hands off. Just run the program from the pad and the rocket flys and comes back by itself. The colored lines are one of the newer features of kOS and are vectors that it's using and I wanted to see. And I think the mod you're talking about is Flight Manager. You're right, that looks really interesting and I'll try it out to see if it works well with kOS
  5. After countless hours of work I am thrilled to finally show my SpaceX style kOS program that can launch, boost back, and land the first stage of a rocket back on the launchpad at the Kerbal Space Center. The video is taken from different runs for film-making purposes, but the program runs from start to finish all on its own. The only thing left to do is get it so the 1st stage engine uses a separate kOS script to fire the engine once the first stage is clear (right now I'm using a few seperatrons) The code is cleaner than some of my past work, but could still use a lot more error checking. Right now it only does a low fuel check or if it thinks there is no possible way for it to get back to the pad (more than a 50' glideslope from 10km out). If anyone knows a good way to run two kOS units at the same time, based off one another, please lit me know! I've thought about using a simple mass detection (if the ship losses more than half its mass in a single frame, then throttle up) but am wondering if there is a better way. Thanks, and I hope you enjoy this half as much as I did! Take a look at the code HERE
  6. Hey all! I've put together a cinematic showing my latest creation: A stock rocket inspired by the Falcon 9 and script that uses kOS to launch a it and fly the first stage booster back to the KSC. I hope you enjoy it!
  7. Yep, those are indeed slots for Cherry MX keyswitches. I bought them in bulk when I was building my Ergodox keyboard and got a few extras for the DSKY project, so shipping was already "paid for". They're probably overkill for this project, but they feel really satisfying to press. I'm glad I could inspire your project and you could in turn inspire my new design. I love this community You're also right about the heated bed upgrade. I added mine after the fact and it also made a huge improvement. It really should be the standard. I got a set of those for my first control panel build, the one I built into a pelican case, and the metal mounting bracket they come with is nice but the key switches themselves are really flimsy feeling. If you don't have access to a 3D printer or a CNC machine they might be worthwhile for their ease of installation and uniform look.
  8. Thanks for the reply and the picture! I think I saw the ones you got with the single input during my search. It didn't even occur to me to just get those and solder a wire on to the DOUT. Good thinking I'm glad to hear you aren't having any errors with your displays. Even after the fix on mine they would occasionally loose sync and need to be restarted. My blue PCB displays are still in shipping, so I'll see how well they work once they arrive. In the meantime, I'm working on a sort of expansion board for my DSKY. I've dismantled it and am rebuilding it (better, stronger, faster, and with fewer dropped packets!). I took the interchangeable faceplate idea from Marzubus and ran with it. I'm setting my expansion board up with 125mm faceplates that mount to 140mm boxes so everything prints nicely. Work in progress:
  9. Nice project! Quick question: What color is the PCB on the back of the 7 segment displays you are using? I've recently put in another round of parts orders and found some nearly identical in appearance to the ones I had issues with except they have a blue PCB with a different layout. I'm wondering if you happen to have gotten yours from the newer batch. Thanks!
  10. Hello again! I've finally finished tutorial #3 featuring rovers. With this script running on a rover the vehicle will automatically reduce steering input the faster it's going, use cruise control, and have a lock steering to heading function. This makes it much more difficult to accidentally flip over. I hope you enjoy it, and if you have any questions please let me know! Download the exmple code here: https://gist.github.com/KK4TEE/5966971602973c24107f The control scheme is as follows: W: Increase target speed S: Decrease target speed Brakes: Reset cruise control to 0 and come to a stop. AG1: Toggle Autopilot AG2: Set autopilot target to current heading AG3: Adjust target heading by -0.5 degrees AG4: Adjust target heading by +0.5 degrees AG5: Decrease target heading until pressed again AG6: Increase target heading until pressed again AG10: End Program
  11. Hi everyone!f I've spent the past week working on another tutorial for kOS and tried to incorporate a few of the community's suggestions. This video demonstrates how to de-orbit and land a rocket propulsively near the Kerbal Space Center. Enjoy!
  12. After posting a video of my work in progress flyback and landing program on Reddit I received several requests to make some video tutorials. This is my first video in what will hopefully become a series. I tried to start with an introduction to the mod and then jump right in to an intermediate level launch script to give new users an idea of what can be done with kOS. This video covers launching rockets and in the next video I hope to cover landing them again. Please let me know if anyone finds it useful!
  13. If you're going for a software/GUI implimentation I reccomend that you check out the basaGC plugin for Telemachus if you haven't seen it already. Before I made any of my hardware projects I loaded that onto a Toughbook and used it as my guidance system. It should be easy enough to run that on a Pi. I'm trying to get my Navball code to run on the Pi, but the way it is currently coded it only gets around two frames per second (though it works fine on my desktop). I'm planing on completely rewritting my code in order to optimize the amount of pixel drawing in pygame to reasonable levels. I've also thought about using the Telemachus library I wrote for python like kOS and have the DSKY actually fly the ship. I mean, "How hard can it be?" I'd love to see whatever you come up with.
  14. I'd like to request that my DSKY project be added to the growing list of hardware projects Link to the thread: http://forum.kerbalspaceprogram.com/threads/101971
  15. After the experience I gained from my first hardware project I decided to try for something a little less kerbal and a little more realistic. After learning how to produce 3D models for a 3D printer I finally came up with a replica of the Apollo Display and Keyboard (DSKY). It is based on an Arduino and displays data from KSP by using Telemachus and a python script that I wrote. I have yet to program noun/verb commands like the real DSKY, but all of the hardware is there for it. The final product: I've also been working on a new python script to take the information from Telemachus and not only pipe it to the arduino, but also display a Navball on a 2nd screen: Like my previous work I've released all of my work under the GPLv3, so have fun with it if you'd like to make your own! Code and designs are hosted on GitHub Link to my FlightTerminal project. It needs work, but it's there if you're interested. If you'd like more information about the project I highly reccomending reading through the comments on the Reddit Post about the project.
  16. Here's a picture of the back of my 7 segment cluster. There is a single through-hole spot that was manufactured too closely to another trace. It ends up making contact and shorting out the serial out port. The first board I tried to fix was the bottom one and I messed up enough to warrent running a jumper wire. I posted my project to Reddit a couple months ago, but I'll take your advice and post it to the forum shortly. Full Size: http://i.imgur.com/YWLv4yj.jpg Once you make that modification the power use and heat output should plummet. It should also allow the serial output to work. Mine still flakes out every now and then after running for a while. I'm not sure if that's an issue with damage to the board, my code, or a poor solder somewhere. I'll figure it out eventually, but in the meantime the 7 segment displays look pretty cool all lit up: I hope this helps you with your project. Good luck! EDIT: Here's the link http://forum.kerbalspaceprogram.com/threads/101971
  17. AmeliaEatyaheart, Great project! I'm loving the progress you've been making. It looks like we picked out a bunch of the same hardware for our projects and ran into the same issue with the 7 segment displays from ebay. Are the MAX7219 chips on the back of your displays becoming hot to the touch by any chance? The lot I got off of ebay turned out to have a defect in the board that shorted the 5V trace to the serial output trace and caused the chips to draw tons more power then they should have and overheat. I was able to carefully dremel out where the defect was and solder in a peice of jumper wire to get around it. Sadly I don't really have a clear picture of the fix; you can kind of see it in the fourth picture from the bottom on my DSKY album: http://imgur.com/a/6XkWy If it turns that the boards you have were manufactured with the same defect as mine I would be happy to disassemble my DSKY and take some better pictures for you. Cheers!
  18. Hi Chris, I have also experienced the bug where the ship moves off the screen and the G-forces rapidly change. Here is my log file and a screen shot: output_log.txt screenshot1.png screenshot2.png persistent.sfs Save file for replicating the bug. The only mod currently installed for me right now is RealChute. Let me know if there is anything else you need, and thank you for all of your hard work!
  19. nyrath and Camacha: Thanks for the tips for interfacing the 12 position knob. I tried my hand at soldering the first one in a resistor chain to use an analog pin and almost butchered it, but it now seems to be working alright. I'll try adding the time-warp controls to my program when I switch the data feed from Flight Recorder to Telemachus. The example code in the links was very helpful. Moach: That's a nice battlestation you've got! Among other things I like the way you have the Logitech and throttle control setup for easy access on the left. I'm looking forward to adding a SpaceNavigator to my setup once KSP supports it, and I'm hoping it will work with Star Citizen as well. I'll try to make a video of the setup in action once I get the gauges working a little more reliably. I need to solder in some resistors or install a voltage regulator for the gauges because the raw USB power seems to fluctuate depending on if the backlights are on or not. If the lights are on the gauges droop down about 10%, throwing the readings off. I'm planing on putting a 5v regulator after my 9v up-converter so that I get a very stable 5v for gauges and Arduino in addition to 9V for the lights. Hopefully I'll be able to work on that some this weekend.
  20. Thanks Rich. That should help me out a lot. I'm looking forward to learning about JSON strings now.
  21. I've been working on this for a couple of months and finally got to the point where it is almost useable, so I thought I'd share. It started as a desire to have a real "Launch" button to press to send off my space ships in Kerbal Space Program, but as evolved into much more. I've built an Arduino based control board that can receive information from KSP and display it on analog gauges, as well as read button presses and toggle switches and press keyboard keys to activate things like staging or SAS. This is my first Arduino Project, first Python project, first time soldering, and first KSP modding attempt. It has been, and continues to be, an enormous amount of fun! The hardest part of this project was figuring out how to get flight information from KSP out to an Arduino over a serial connection. At first I tried to write a plugin for KSP that would print values to a serial port directly, but I quickly became overwhelmed and decided to try another approach. I then tried to find a way to use information from Telemachus, but I couldn't figure out how to parse the server to get individual bits of flight data instead of a graph. I'm fairly sure it can be done, but I'm new at all of this and couldn't figure it out yet. I ended up finding a mod (Flight Recorder) that would save flight information to a CSV file every 200ms. I then wrote a Python program to parse the CSV file, create a dictionary using the headers (Mission time, altitude, Geeforce, etc) and then read the last line of the file for the values to add to the dictionary keys. It then formats it as a string and prints the values to the serial port with a newline character at the end. Sadly Flight Recorder doesn't (yet) record resource usage, so I had to experiment using kOS to log that information to a separate CSV file. This actually works great for a few minutes, but I don't think kOS was really meant to write to a file 5 times per second. It seems to develop a memory leak and crashes the game fairly quickly. Reading toggle switch states and keypad buttons into KSP was actually fairly easy. I used an Arduino Micro setup as a USB HID Keyboard to press a pre-programed key based on which toggle switch was flipped. When I press the yellow "Stage" button the arduino sends a "Space" character from the keyboard. When I press the blue SAS button it presses "t" as a keyboard. The tablet computer (or any device with a web browser) is able to view a simple HTML page generated by the python program. The python program calls a set of functions that print HTML headers to a file, then print the dictionary that stores the most recent flight information, then print the trailing HTML. I got the idea of doing it this way from one of the other mods that was like Flight Recorder (but sadly I can't remember what it was called). Basically the table formatting doesn't change, so you just print the HTML code in between each call to print a piece of flight data. The resulting HTML file is then served via an Apache webserver that I have on my computer, which can be accessed by any other computer on the LAN (or internet, if you setup port forwarding). My code for this doesn't work very well yet, which is why I ended up using a lot of place holders so far. I'm still learning how to prevent extra "\" characters from showing up, as well as odd spacings, among other things. Once it is useable I'll add it to the github page. Here is a part list of most of the things I needed for the project, not including tools: The pelican case and waterproof connectors were probably the most expensive bits. 1x Pelican 1200 Case 1x Arduino Micro (for reading the button states) 1x Arduino Mega (for driving all of the displays) 5x Colored LED Angel Eye buttons from spark fun (product 11966) 2x Power Symbol LED button from eBay Various LEDs and resistors that I got from kits on Amazon and Radioshack 1x "4x5 keys metal panel" keypad from eBay/China. It has removable caps so you can print your own labels ("Map View" for example) 2x 12 position rotary switch "Amico Split Shaft" from Amazon, with knob. These weren't as useful as I had anticipated. I wanted to use them to set individual time warp levels (1x, 5x, 10x, etc) but I don't know how to pass that into KSP. 8x 5v Voltmeter from sparkfun. These were more cube shaped than I anticipated, but work fairly well and feature swappable backgrounds so I can label them "Liquid Fuel" or "Electric Charge" instead of "Volts". 5x Eight digit 7 segment display with serial interface (kit). I'll use these to output Altitude, Periapsis, Apoapsis, Current Velocity, and Radar Altimeter or MET. The serial interface is used to save pins on the Arduino. 5x Covered Toggle Switch w/ LED (Missile Cover) from Sparkfun. Smaller than expected, but they do allow you to toggle the LED separately from the switch. 1x "On/Off Key Switch with 2 Round Keys" from Amazon. The one from Sparkfun looked kind of cheap, so I bought a larger higher current one from Amazon. 2x SB400 Solderable breadboard from Amazon. I only used one, but I ordered a second just in case I messed up. -- Various USB cable adapters. 4x 1/8"x12"x12" Polycarbonate sheets from Amazon to act as the mounting surface. LM2587 DC/DC Booster Converter Voltage Regulator from Amazon. This converts 5v USB power to 9v for the LEDs buttons and future desk lamp. 5x TIP120 Transistor from Amazon to switch the 9V supply for LEDs. The idea is so that when a ship runs low on Electric Charge the Arduino will quickly flicker the LEDs to simulate low power. It also lets me dim all of the various displays/LEDs depending on how bright I want them to be. 1x 4x20 Character LCD w/ Serial interface from eBay. This will display anything that I don't feel like having a dedicated display for. 1x Waterproof USB connector from usbfirewire.com. The first one had a defect with the cap, but their customer service was very good and they sent a replacement via next day air. 1x CAT6 Waterproof connector from Amazon. 1x Box of military surplus gauges from eBay. I ended up getting some cool ones including the ones pictured in the album and one multi gauge labeled a "Bat-o-Meter". It turned out to be used for testing batteries, not seeing how close you are to Gotham City. Imugur Link with more pics: http://imgur.com/a/iF0sT Reddit Link w/ some discussion: http://www.reddit.com/r/KerbalSpaceProgram/comments/1s1hn6/my_custom_ksp_control_board/ I've put my code up on github under a GPLv3 license in case anyone is interested in doing a similar project for themselves. https://github.com/KK4TEE/Control-Panel If anyone knows of a plugin for KSP that can print serial output, please let me know! My eventual goal is to get a KSP plugin in C# that can send data out a serial port directly, but I have a lot to learn still before I can code that myself. Thanks, and enjoy!
×
×
  • Create New...