Jump to content

BamBam

Members
  • Posts

    93
  • Joined

  • Last visited

Everything posted by BamBam

  1. This is awesome! It worked for me immediately, no configurations needed. Now i just need an old android device to make into a secondary display
  2. Is there a build already compiled that i can try out, even tho its probably not fully tested and stuff?
  3. By the way, the other guys code I am looking into using is this. https://github.com/Richi0D/Kerbalcontroller My hardware goals would align with this for the most part. I quite like those displays, but i dont want to order them unless i can figure out the programming. EUREKA!!!! The buad rate in this batch of code for the serial connection was different than the one in Demo17. It was set way higher. I changed it down, and now it talks!. The tx and rx lights on the Arduino go active when loading a rocket. Thats enough tinkering for today. I can go to sleep feeling all accomplished and stuff.
  4. ok. so this function under the output section. void controls() { if (Connected) { if (digitalRead(SASPIN)) { //--------- This is how you do main controls MainControls(SAS, HIGH); setSASMode(SMSAS); //setting SAS mode //setNavballMode(NAVBallSURFACE); //setting navball mode } else { //setNavballMode(NAVBallTARGET); MainControls(SAS, LOW); } if (digitalRead(RCSPIN)) MainControls(RCS, HIGH); else MainControls(RCS, LOW); if (digitalRead(CG1PIN)) //--------- This is how you do control groups ControlGroups(1, HIGH); else ControlGroups(1, LOW); /* if (getSASMode() == SMPrograde) { //--------- This is how you read SAS modes //Blink LED, do stuff, etc. } if (getNavballMode() == NAVBallTARGET) { //--------- This is how you read navball modes //Blink LED, do stuff, etc. } */ //This is an example of reading analog inputs to an axis, with deadband and limits CPacket.Throttle = constrain(map(analogRead(THROTTLEPIN), THROTTLEDB, 1024 - THROTTLEDB, 0, 1000), 0, 1000); //This is an example of reading analog inputs to an axis, with deadband and limits //CPacket.Pitch = constrain(map(analogRead(THROTTLEPIN),0,1024,-1000,1000),-1000, 1000); KSPBoardSendData(details(CPacket)); } } Where it calls 'if digitalread rcspin' that means : if the digital pin defined as 'whateverpin' is connected to ground (button pressed), the do the following make 'whatevercommand' have a 1 as its bit else make 'whatevercommand' have a 0 as its bit and then the "maincontrols" function enforces that its binary and not some analog value, and ads it to the packet. Have I got that right? so each button press command you want to send thru serialio follows that syntax?
  5. ok, so i have belatedly come to realize that i cannot simply copy somebody's code without having their exact setup. So, I will be starting from the Demo17 code. That Demo17 code works just as it should. Here is my rough plan... I have a USB-HID interface board that I will be using for the actual input into the game. that lets me keep the input functionality separate and simple. I plan to use serialIO to drive my indicator LEDs and a set of 7 segment / 8 digit displays to show altitude, apoapsis, periapsis, velocity. and some analog guages to show fuel levels, and atmosphere density. It means that i will have to have two USB cables connected but that is no big deal. So, instead of somebody to solve my problem for me, what i need is a really basic tutorial on how to make the starter code in Demo17 to do what i tell it. My programming skills are all from 1994 when we did Turbo Pascal in High School. Since then i have not done anything more than write batch files and a few really simple if/then operations. So I have basically zero experience with Arduino. My 3D printer ran briefly on Marlin but even that code was already setup and you just had to define a few variables. Dipping into some major wishful thinking here, I saw on this or maybe on the subreddit /r/kerbalcontrollers that somebody had made a sort of DSKY display that used a small LCD panel. That was beautiful, and if I could figure out how that was implemented that would be a major upgrade to my sort of simplistic plan at the moment.
  6. I just found this mod, and it all functions quite well. I see that the orbital maps bug is still there, but the really killer bug is the halting micro-freezes. The flight of even a really simple rocket is stuttery and halting. If i do not place the telemachus antenna on a ship, and load the flight normally then it runs smooth. If i place the antenna on board it becomes all stuttery. Has there been any progress on identifying the cause of this? What can I do to correct it?
  7. Is there a guide somewhere to how to add controls? I am looking to add other stuff over time... 3-axis joysticks for rotation and translation, a couple of Nextion displays, etc.... I have some sample code from other peoples projects for comparisons, but i dont think i can do much copy and paste without screwing things up.... baby steps / walk before you run / that sort of thing. I am using the Arduino sketch posted on /r/kerbalcontrollers by a guy who goes by wurmi00 because i want to use the nextion display setup that he did. However, i am not getting any response from the plugin that way. I think i need some config help. I may be using a mismatched version of the plugin or something. The arduino lights blink showing that data is tx and rx. but not all that fast,. When i run the demo code, things work and that light blinks really rapidly. Any input is welcome. .
  8. Thats either a crash or a takeoff. 9/10 i wish it was clearer
×
×
  • Create New...