Jump to content

ohMorrissey

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by ohMorrissey

  1. Is there anyway to increase refresh rate on external devices? The data is updating real time on the host PC but on a separate Raspberry Pi the refresh rate isn't too great, (using for a sim-pit) Could I make the Data sent across smaller? (Remove the data I don't want) Thanks
  2. I'll give both a try individually then together if it doesn't help enough, Ill let you know My more demanding functions are run once over about 60 loops, I use a global timer, Originally when I used my IC's the shift in and shift out functions caused SerialIO to drop out (They use bout 30ms worth of the delay function), so now it runs over multiple loops, eg: int GlobalTimer = 1; void loop(){ input(); if (GlobalTimer == 1) { // Pulse latch pin } if (GlobalTimer == 20) { // Read first pulse from ICs } if (GlobalTimer == 23) { // Read Second pulse from ICs, etc for all 8 pulses, 3 ms apart } if (GlobalTimer == 60){ // Run HUD functions GlobalTimer = 0; } GlobalTimer++; delay(1); }
  3. I have my simpit finished and functional, control and all (windows 10 btw!) Is there anything that could cause intermittent connection drops? The code multi tasks to read 5 ICs and write to one screen but it doesn't stop talking to KSP while it does so, was wondering if there is anything else?
  4. Enclosure 20180425 Busy life got in the way for a while but I am back on track for finishing the build, The enclosure was designed on Inventor like the rest of the panels, that way I can get the vector files for the laser cutter but this time I could also use the parts to make rendered assembly of both the enclosure and final product. The enclosure is made of 6mm MDF, laser cut and designed to fit together like a 3D puzzle. It worked better than I thought. As the edge left by the laser isnt perfectly straight, there are some gaps here and there, the execution wasn't perfect but still looks incredible. As I am trying to punch out the code before Uni gets really ramped up for the semester, it shouldn't be too long until this bad boy is working fully. Ill record a video of it working, I am thinking of starting a proper YouTube channel and start doing a lot more builds as we are building a big workshop on the new property. Possibly thinking an R2D2 next as it has been a dream since a kid. That might be a 2019 job as I am really knuckling down on study. Top Post
  5. Final Laser Cut Panels 20180224 started looking at acrylics for my final panels, originally I was looking for a solid grey, but the only ones I could find were too light for my liking, I found a frosted smoke colour that I loved and went to paint the back, the hardware store I went to didnt have white acrylic spray paint but suggested a self adhesive white laminate to do the same job. The splash back effect looks way better than I had hoped, the white text on the front casts a shadow on the splash back white of the back, The first attempt didn't work properly, the laser was set to cut 3mm acrylic, but (just a theory) the laminate on the under side absorbed too much of the energy which bowwed the sheet. so after a while the laser was out of focus but made for some cool fireworks, but didn't cut all the way through on 70% of the first cuts. ( as shown in the third photo) I just used a white paint pen and coloured over the etches, gave it 5 minutes to dry, then wiped the excess paint off with a paper towel and some isopropyl alcohol spray. I will post pictures of all the panels soon, with all components installed. These photos are from the first lot, the second has a few changes that Ill note.
  6. Printed switch guard Update 20180222 Ever since I started, i've seen other use switch guards, some use evenly spaces U bolts to give that affect but I wanted to look close to the real deal, which are sold for about $20USD a pop plus shipping from America,. so I decided to 3D print them, I designed them to slide over the switches and they have little grooves in the panel to slide into, so they can be discreetly hot glued in place from behind, The end product looked really good even for a 3D printed finish, cost me $2.50 to print all four at the Adelaide FabLab, ~20mins printing time each Top Post
  7. Final designs Update 20180216 The designs are somewhat final and ready to get laser cut, They are all on a templated sized panel so I can interchange them as well making the build completely modular if I want to redesign the enclosure later (Hinting at a full seated simulator in the future maybe). The Red lines are going to be cut, all measured to fit all the switches and joysticks, the blue is going to be etched and coloured in with white paint. So because kerbal serialIO doesnt have the mode feature implemented yet, I thought id use a knob just above the attitude controls to swap between rotation and translation, but I also include a mode for fixed wing flight, So that while landing a lander on a planet, the joystick x axis is for yaw you can switch to fixed wing and make the x axis roll. This gets around the one problem I hated about using a joystick for in KSP Top Post
  8. Shift registers and PCBs Update 20180215 After making a speedsheer of all my IOs on my mega, I figured out I dont have enough pins for my build. (I know, running out of pins on a mega? How? Less than 60 Digital pins on the mega, more than 60 IO pins required for switches, joysticks, LEDs and LCD screens.) Ive taught myself 99% of the build so far, shift registers couldnt be so hard? After a decoder function, its fairly easy. So easy Ive actually decided to use shift registers on the back of every panel to reduce the wiring, Ill make PCBs like the one for the screen for every panel. I used a binary counter to test my warning matrix and it worked really well. 4 pins (3 for shift, one for extra IO) to control the whole matrix of 9 LEDs? You beauty Top Post
  9. Warning LED Matrix Completed 20180212 Update Just finished the final touches on a warning light matrix, I had the back section 3D printed and while I was looking at acrylic options for my final panels the guy at the store recommended this frosted clear acrylic to go over the top as a defuser. Regular LEDs weren't bright enough I bought super bright LEDs from little bird electronics because they were a little cheaper than Jaycar and they squeeze perfectly into the holes, with a little bit of super glue to keep them in place. I had paper for the labels originally but it was too grainy and while not even looking for another option my plastic store recommending the frosted acrylic and getting the labels printed on transparent sheets at office works. The plastic still didn't defuse enough and gave a centred focus light, so 1/8 of a cotten bud in each of the boxes absorbed enough of the light to make each section light up completely evenly. It's unfortunate that I didn't notice till after glueing and soldering everything together that one or two of the lights are darker with a green tint but it's not too big of a deal. Using white means at this point I won't gave coloured warning lights but I actually love the final look. Top post
  10. Warning LED Matrix 20180211 Update Working on a matrix of warning lights to incorporate into the build. At this point im planing on having it 3D printed in the fablab reasonably cheap, I only have to pay for the filament I use. I want to spray paint the inside of the boxes white so the light reflects off all sides. This is the warning labels I will print off and have over the front, most likely laminated if it works well. I'm thinking about making them flash for the first 2-3 seconds when they turn on to catch your attention better than just lighting up. Top Post
  11. Autopilot controls, control via KerbalIO, 20180210 Update So I've fiddled around with the output function in KerbalIO and it's working well with my Windows 10 and I've just figured out how to use it well with my build. At this point I want to scrap the keyboard emulator portion of my build which will mean only one arduino. I don't know how Kerbal serialIO will run with two arduino's plugged in so I may run some tests later but at this stage i'm axing that part so I will lose the game controls like the map function and camera control but I may bring that back if I ever make a full enclosure with no keyboard space. Using KerbalIO for the controls gives me access to using the autopilot modes at the touch of a button. Prograde, retrograde, maneuver node and target etc SAS modes. It can also allow for some more creative coding which gives me more functionality options than I had before when using Keyboard.h emulation for the controls. At this rate im sticking with the microswitch joysticks instead of pots even though Kerbal IO allows for custom analog axis. I still like the feel of the arcade style more than the realism feel. This may change if I get to building a full cockpit in enclosure 2.0 but I dont know until its all working Top Post
  12. Dual Screens and First Circuit Board 20180208 Update So obviously this project had been left alone for a while, I got a HTC Vive for my 21st and had been between using that and concentrating on uni, moved jobs a couple of times and left this on the back burner. After a very insightful meeting with someone in the Project Management industry he encouraged me to pick this back up again. I have been working on it for the last couple of months and by the time of posting this, I've actually almost finished, but i'm going to post updates sporadically to keep things spaced out. I have soldered up my first circuit board to save a ridiculous amount of wiring, it is wired to run to LCD screens independently but shared all but one of the wires (latch pin I believe). Using these Protoboards from Jaycar I can wire the several LCD pins straight to 5v and GND respectively, without having to have the long mess of wires going straight to the PCB at the arduino end. At the moment the wires are plugged in to mirror the screens but they are able to be controlled separately. So far my plan is to have four buttons controlling the info selection mentioned in the previous post, and control the screens together instead of independently while still displaying different info. The Connections just use basic headers and female to female jumper wires that I didn't pull apart after buying. You can see the resistors for the LCD backlight and the 7 input headers in the middle. The group of four control serial communication and the other three are the two seperate latch pins as well as the clock pin. The final two headers at the back are just the 5v and GND connections. I still have to had pull down resistors and headers for the buttons to select what data the screens will show. Top Post
  13. I got the modes working when I coded it so that the SAS is always on when the code is running, and the button changed direction (Pro/Retro) when (HIGH/LOW) and worked, the example code only activated SAS when the button was (HIGH), might be a Win10 bug? still working towards doing exactly what you are trying to do but i'm gonna construct my panels first. PS: The example worked but mine didn't, found it only worked when I copied all my added code back into a fresh set of demo16 files. Couldn't find any difference between my old code and the copy back into the fresh files but it worked after none the less.
  14. Hi, Im playing around with controlling SAS modes, and I can't get them to work, Just wanting to clarify that void controls(){ if (connected){ if (ButtonState){ setSASMode(2); } KSPBoardSendData(details(CPacket)); } } should engage prograde SAS? if not what am I doing wrong Edit: KSP version and Pluggin are up to date, Windows 10 Im using a mega
  15. Heads Up Display Screen 16/6/17 Been busy with Uni and exams so haven't worked on this much recently, but finally got the LCD code working with minimal flaws, I also have an intro to laser cutting at a fabrication laboratory tomorrow so I can start cutting my panels! Most of the code is so that it displays the floating values in a readable way, eg velocity=1234567, will be displayed as 1,234,567m/s which is easier on the eyes. It also does some calculations to determine fuel percentages and what not. Ive also bought some 6v servos to try and make dials, servos just seemed easier to control and I can make them look however I want. Heres a demo video of what it can do at the moment: (Don't mind; Framerate;Halo Theme; Video Quality, use of mechjeb) V20170523 I'd also like to change it to display the info like this, it makes it more difficult to understand but more realistic and I can display more at once, (Data is just example, not from KSP). But this will take a lot of re-coding. Id like two of these screens next to eachother to display 8 data points at once Top Post
  16. Im not quite sure if you mean control or access the data, Controlling the Data I use a different method, my code acts like a keyboard so it doesnt use serial IO, As for accessing data, you can use VData.AP for example to access the apogee data, you can use all the different data floats to make more as well, such as fuel percentages and what not
  17. Heads Up Display Screen 27/4/17 So I thought I might actually try to have a heads up display and have looked into using KerbalSerialIO. It took a fair while to get working properly but found out that the Chip in the Due isn't suited to the code so its currently running through an old Arduino Uno knockoff. I went out and bought an LCD screen to learn to program and use. Once you find the liquid-crystal library it becomes relatively easy. The LCD behaves oddly as it prints on the 1st line, then 3 then 2 then 4. Using lcd.setCursor() its an easy solution to get around this. Using Zitronens demo16 and modifying it, (removing pieces of code that I wasn't going to use) and I could access the floating point of the Surface velocity (Vdata.VSurf) and display that on the screen. Rather than using LEDs to display whether or not it was connected I simply Displayed that on screen. GitHub Arduino Code Top Post
  18. First Prototype - 27/12/16 Whipped this up as a prototype, all works as it should plugged into the due, im using a state change recogniser so that the arduino simulates a button press when the switch changes state, rather than just holding the character key down. This way I can flick a switch down which will press an action group (0 key) to deploy solar panels, flick the switch again (0 key) to retract panels. But on the controller it just looks like the panels are linked straight to the switch position. void SwitchScan ( int Pin, char Output, bool& PrevState){ bool State = digitalRead(Pin); if (State != PrevState) Keyboard.write(Output); PrevState = State; } I have wired all my inputs with Pulldown resistors, this way I can wire the LED's into the switch circuit. But because the Arduino Due runs on 3.3V, Ive had to wire the switches with LEDs with 5V to accommodate for the 2V drop from the LEDs. Top Post
  19. For Rocket Use Only - 18/12/16 At my local electronics store I found this Thought it would be perfect for a stage and stage lock switch and a perfect place to start. And gave me the code name: for rocket use only. Got my Arduino Due in the mail and started looking at the keyboard.h library to be able to control KSP. I'm just using the Due as a keyboard emulator to simulate the button press (space for staging) The Ignition panel is wired so that the button will only create a completed circuit if the missile switch is on. /* * ohMorrissey * For Rocket Use only * Kerbal Space Program Staging Controller * 18/12/16 */ #include "Keyboard.h" int StagePin = 9; void ButtonScan(int Pin, char Output){ bool State = digitalRead(Pin); if (State == 1) Keyboard.press(Output); else Keyboard.release(Output); } void setup() { pinMode(StagePin, INPUT); Keyboard.begin(); } void loop() { ButtonScan(StagePin, ' '); delay(50); } I have considered KerbalSerialIO but it seems way to complicated for my coding knowledge so far Top Post
  20. Hi, Im creating a Build Log for my custom controller / sim pit,

    How did you use google sites to put your own pictures up?

    Thanks in Advance

    1. zitronen

      zitronen

      Hi, I'm not sure I would recommend doing things this way, since google sites has very limited space you only get 100MB. I'm just uploading pictures and direct hot linking to them.

    2. ohMorrissey

      ohMorrissey

      Yeah once I had a look around I figured Imgur may be the way to go

  21. FOR ROCKET USE ONLY: A Kerbal Sim-pit Build Log A name derived from the first piece I bought, a racing car ignition switch with "FOR RACING USE ONLY" printed across the top. This Project started mid 2016 and while its a matter of months off being in a completed form, like most maker projects, I don't ever think Ill be "Finished" with it Aim My aim is to make a sim-pit that surrounds a keyboard that includes a joystick (microswitch, not POTs) and as many switches and buttons I can. After many months of looking at layouts and design themes, I've settled on going for the most Raster Prop Monitor looking IVA theme I can, basing a lot of my panels on this mod. If you don’t know RPM it adds a fully usable IVA into Vessels and looks so aesthetically pleasing: EDIT: This is actually the command pod from the ALCOR mod The Idea is to go more for fun to use than practical. I want as many missile switches and pointless (but useful) knobs and flashing lights as I can. Basically I really want to go for that Arcade, really fun to use feeling even if its not overly practical. Hardware/Software I'm currently using two Arduinos and coding with Arduino's IDE; Arduino Due Old Arduino Uno knockoff (Freetronics Eleven if anyone cares) Arduino Mega The Due uses the <Keyboard.h> library to emulate button presses to control KSP. Flicking a switch will emulate a keyboard pressing a button, for example, flick the light switch, the Due sends a “U” to the computer. But because the switch can be stuck in the on position, the Due only sends the command when there is a change in state. *** The <Keyboard.h> portion of the project has been scrapped in favour of using Kerbal SerialIO's control functions. This means I have lost some functionality meaning a keyboard is still necessary however there are also a lot of pros of doing it this way. This completely removes the use of the Due. The keyboard emulation may return if the build gets an upgrade/increase in size. *** My KSP uses a mod called Kerbal Serial IO by Zitronen, the mod does nothing to the game but sends data packets to and from KSP to the Arduino via Serial communication. Way too technical for me but once I got mine working, it has infinite potential. I'm able to access data from KSP and either print it or use it as logic for warning lights. Their is infinite possibilities with this thing. I have also been able to get my code working with WIN10 as some people couldn't get the control packets working on windows 10, the bug has been fixed and I am now using the control packet to control KSP. I am using two DuinoTech 128x64 Dot Matrix LCDs as my HUD. Arduino has its <LiquidCrystal.H> library making it so easy to code for the screen. Controlled by four buttons to switch between different data sets relevant to different situations and a neat little protoPCB to make all the wires a lot neater. The whole build is designed on five identical sized panels to allow for easy modular use incase I rebuild the enclosure (thinking about a full seated simulator in the future, maybe) Current Stage Here's a few things I've currently got working Currently Built/Working: Staging Button and Stage lock Switch (Prototype) Toggle Switches emulating keyboard press (Controls SAS, RCS, LIGHTS, GEAR) Dual LCD Heads Up Display with real time Data from KSP (currently only displays speed) Fully implemented as of early 2018 Communication from KSP to Arduino (KerbalSerialIO Mod) with onscreen *LED connection Status indicator Control Packets sent from the Arduino to Kerbal via Kerbal SerialIO LED warning Matrix Apollo Style toggle switch guards Laser Cut acrylic panels Custom Enclosure surrounding Keyboard Planned: Custom Enclosure surrounding Keyboard ({Implemented Mid 2018) Joysticks for Attitude and for Throttle (Purchased but not coded and implemented) Controls for LCD Screen changing the Data printed on screen (Implemented early 2018) Possible second LCD for more Heads up Data (Implemented early 2018) Warning LED matrix (Designed and built early 2018) Laser cut acrylic panels with back lit text. (Implemented early 2018, no backlit text.) Possible custom analogue throttle Resources + Credit Ill post all my code but most of it for the Uno is Zitronen’s “Demo16” Code which I have modified. I'll make it clear in the Code what is mine and what was original. All code for my keyboard emulating Due is original. I will comment in code if that changes. *Due removed from build I’ll also make sure to give credit where it's due (in the forum or in the code) as I’m taking a lot of inspiration from other Build logs as I find the fascinating. If I miss something, I apologise. GitHub Code Not really updating anymore, will post final code when done, not posting every iteration Build Logs 18/12/16 For Rocket Use Only First Prototype - 27/12/16 Heads Up Display Screen 27/4/17
  22. I have just tried that, with no luck, However, I have just tried the code on an old Uno knockoff and am currently printing Apogee and Velocity to an LCD screen, Really appreciate the help!
  23. Even getting data from KSP? I've seen a few posts, including other threads where it says you can still get data from KSP, you just cant control anything. My board is definitely recieving data, it just isn't doing what it is supposed to do with said data
×
×
  • Create New...