Jump to content

pantner

Members
  • Posts

    54
  • Joined

  • Last visited

Everything posted by pantner

  1. I'm certainly no expert on the matter, only landed on Mun, Minmus and Duna. Pretty sure all of mine have been single stage. My Mun/Minmus landers have a FT400(?) with 4 of the smaller tanks around it for a larger landing base. Sometimes a 909 as the engine, other times the smaller ones (rockomax 447? im sure you know what I mean). One on each fuel tank (ie, 5) with the outer ones thrust limited to 50%. My Duna lander started it's decent and dropped the transfer stage, leaving 2xnuke engines. I landed, took off and made it home with those. Have considered 2-stage but never actually built any.
  2. hmm, ok then, what do they do then? Just trying to get my head around what I need to change in the code to start when I start adding all my own inputs and leds, etc.
  3. in the main sketch you have #define GLED 5 #define YLED 6 #define RLED 7 and then further down you have #define SAS 7 #define RCS 6 #define LIGHTS 5 aren't they referring to the same pins?
  4. Yes, i am using the LCD library, and not having performance issues now that i am using the 8-bit bus for the LCD. Actually going to use it to read groups of digital inputs (and possibly do outputs aswell, ie, LEDs) and then Case statements to do specific things as opposed to using an if statement for each input. For example, i too am going to use a rotary switch to switch between different displays but i don't want 6 if statements for it. From my understanding if statements are not very efficient. Reading all pins as a single value and then using a case statement would definitely be much better. was just an idea. maybe a value in the config file for the plugin to turn mechjeb support on and off? *EDIT - Also, looking through the plugin more...seems you have defined the same pin to 2 different functions? 4-5-6-7 are seem to be 2 'things'???
  5. something I just came across that is definitely going to be a big help for me http://tronixstuff.com/2011/10/22/tutorial-arduino-port-manipulation/ allows you to read or write to pins as a group instead of individually. Should increase the speed of your code and possibly reduce the size.
  6. yea, my LCD was really cheap ($6 on ebay) so it might have a slower controller or something...I dunno right, gotcha doh, I see that now, sorry, I missed it! Now I can start working on my different 'screens' for the LCD Thanks again for all your help!
  7. Got my issue sorted! My code was fine, seems it was the 4-bit bus for the LCD Panel. setup the 8-bit bus for the LCD display and it is now working well Already had the wires connected so decided to give it a go and it appears to have fixed my issue. I had AP and PE 'height', orbit velocity, orbit inclination and orbit escape (Whatever VData.e is). I have purchased a 6-way rotary switch, so will try and setup a similar system to you with different displays. ie, a take-off/landing display, normal space, transfers (ie, manoeuvre node stuff). One other thing I just thought of, is it possible to have the manoeuvre node delta-v value passed through?
  8. the problem you may have is that if you leave your controls switched on/off, then if it doesn't check the settings on initialisation then certain controls could be inverted. ie, you make a flight and leave SAS turned on. You quickload/revert to a time when you had SAS turned off but your physical switch is still turned on. In order to turn SAS on you must switch your physical switch of 'off'. (or use the keyboard to return it to the correct setting according to your physical switch) The plugin checks all of that for you. and the Teensy just looks like a variation of an Arduino, how would that be any different?? or am I missing something?
  9. Hmm, very odd. Everything seems to work on it's own, it's when I have over 3 values being displayed that I have issues. I am converting each value to a string if that makes a difference? Will try and add some debugging in.
  10. that would be cool Also seems im still having issues with my code. Got my display with AP, PE and orbit velocity showing. When I add orbit inclination or the escape value (can't remember the name) it just seems to die. Is it because I am doing everything as a separate print command? Would it help If i used an 8-bit connection? (using 4bit at the moment)
  11. I've been doing work on my custom control panel/display. This is what I have got working so far. <a href="http://imgur.com/HeRGdRC"><img src="http://i.imgur.com/HeRGdRC.jpg?1" title="Hosted by imgur.com" /></a> The plugin to do this can be found in this thread if you are interested... http://forum.kerbalspaceprogram.com/threads/66393-Hardware-Plugin-Arduino-based-physical-display-serial-port-io-tutorial-%2804-May%29
  12. that's awesome, thank you very much for that. I think I have my code sorted now...started again and while I did use my old code for reference, I think I've improved it. Just had a thought, would a string variable of the body you are orbiting be possible to add it?
  13. Think I worked out a good way. Covert to string using dtostrf with a negative (as you suggest), however, im still left with trash characters. I then pass it to a function along with the max length of that string which compares the length in a loop and adds spaces to the end as necessary. I also appear to be having trouble with my float calculations, seems to be stalling the unit and stopping the read out. but getting there slowly! almost got AP, PE, Alt and velocity reading out with unit changes as the numbers get larger. ***EDIT, hmm... I have AP distance, PE distance, Altitude and Speed all working...but I can only have 3 at any one time. If I do all 4 of them the system seems to only update once every minute or so. ***EDIT #2 - I think it might be related to the 'VData.Vsurf' float that I am using. will change it to orbit speed when it is put in the plugin. Oh, and I think I have a library for the time conversions
  14. I found dtostrf, I don't like it because when the string gets short it gets right justified so for velocity I could end up with "V= 12m/s". Not sure if that can be changed? Does the blank spaces make it flicker? I tried using lcd.clear() and that made it flicker horribly. umm, time/distance til maneuver node would be nice? Also, how do you format your times? Have you written code or is there a function that will convert seconds into minutes, hours, days, etc?
  15. how are you dealing with the 'trash' characters on your LCD? ie, your speed drops from 100 to 99 but the LCD displays 990 because you didn't tell it to stop displaying the last 0 from 100... **EDIT - also, just realised, there is no orbit velocity reading? or am I missing something?
  16. That's cool, keep at it took me ages to get to that stage! I would suggest, might be best to try a Minmus landing...Is a little harder to reach but much much much easier to land
  17. Ok, been a while since I've posted here. Been very busy lately. Received my 20x4 LCD display and have been fighting with it for a couple of days, finally ironed out my problems and got it working (Hello World! ) And just now (as a proof of concept) had it displaying the 'vertical velocity' Thanks again for this amazing plugin, will post back when I have something more stubstantial to reporting... Might look at the throttle next... Any idea what rating pot would be best used to get the full range of it working? 5k? 10K? Obviously need to put it all the way to 100%, but don't want it to reach 100% when the physical throttle is only at 75%...
  18. the other thing you can do is run a switch with 2 'sides' and just have the second side switch the LED on and off. Now I always get confused...Think that is a 'dual throw'. ie, DPDT (dual pole, dual throw... it has a connection either side of the 'common' and is basically 2 switches thrown at the same time)
  19. yea that's right, but don't forget the 'pull down' resistor. probably a 10K. That drops the voltage on that pin enough for the arduino to read it as 'low', then when you turn on the switch and close the circuit it goes 'high'.
  20. but if you do use the circuit posted, the logic will be backwards? You're connecting the switch to ground?
  21. There are addons for the Arduinos that allow you to add extra inputs/outputs. I believe I posted a link to one a few pages back You can get Dual colour LEDs which you might like. Also, you can use the circuit Katamari posted without the LED, and a 10k resistor and have the logic the way you wanted a few pages back. Switch closed = switch on = Pin high If that makes sense? Not that im an expert, would that not make some kind of voltage divider? Or because the Arduino draws so little power it doesn't matter?
  22. this Is what I ordered, will see how I go when It arrives... http://www.ebay.com.au/itm/271061312409?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649 I mirror the requests of the other guys, action groups, cut engines, change control modes... As I mentioned before, would also love an analogue throttle control... but currently my control panel consists of an Arduino on a breadboard with a single switch, so no rush Also need to order myself a Mega, me thinks...
  23. ok then, having a squiz through the source code now, is there anything there at the moment regarding checking the SAS status so I know what to look at? btw, love Debug.Log("KSPSerialIO: Dude do you even win32 serial port??");
  24. ahh, didn't see that! Will need to do some more reading as to what things like uint8_t actually do btw, forgot to mention, the timing for the control is instant, no delay. also, if I want to add an LED light for something (ie, SAS) should I add an extra function into the loop to control that or should I add it into the 'output' function? And should I be checking the state of the switch or getting feedback from the plugin as to whether it is 'on' or 'off'?
×
×
  • Create New...