1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Using plugins to drive servo motors

Discussion in 'DIY Motion Simulator Projects' started by hugso, Oct 6, 2013.

  1. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Weird indeed proof that it compiles, just fine.

    Attached Files:

    • Informative Informative x 1
  2. Hypo

    Hypo Member

    Joined:
    Oct 4, 2013
    Messages:
    50
    Occupation:
    Former cooperate enterprise software developer
    Location:
    Harlow, Essex, UK
    Balance:
    879Coins
    Ratings:
    +24 / 0 / -0
    Cheers, eaorobbie. The code you sent in the zip file does the business :)

    Sorry to send a forum question about this. I know it is a quick and dirty way to get an answer. Not sure why the code I cut and paste from the thread wouldn't compile. No matter, the main thing it now works!

    Many Thanks :)
  3. bsft

    bsft

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    as I am not arduino familiar, on the point of resale, I use the pololu JRK, which is code free to program, and I have sold 3 former builds with them. The nightmare that followed because the buyer wanted to change settings because they THINK they knew better, was horrendous. I set them and told them to leave it alone. Good luck if a buyer of a sim doesnt want to mess with the arduino. I spent a LOT of hours going back and forth fixing things that were best left alone.
  4. Hypo

    Hypo Member

    Joined:
    Oct 4, 2013
    Messages:
    50
    Occupation:
    Former cooperate enterprise software developer
    Location:
    Harlow, Essex, UK
    Balance:
    879Coins
    Ratings:
    +24 / 0 / -0
    Because of the software I wrote, the FCIProject, I have been approached by a few individuals and companies. The best person I have worked with is Hugso and we have become good friends. We work as a good team. Hugso does the hardware and electronic engineering and I deal with the software development and IT stuff.

    I did sub-contract for a small company who wanted to build R22 helicopter simulators that worked with X-Plane. The CEO of the company wanted to design custom built instruments and controls, so they were his own IP, and I was contracted to adapt the FCIProject and write a Module (plugin) that controlled these Microchip PIC custom designed devices. To do this I had to learn PIC programming. The timescale to produce the first working instrument was six months, which was tough, but achievable. Then the CEO got a friend to invest in the company. This was a big mistake. The trust the CEO and I had built up over two year was destroyed in a matter of hours. This so called consultant friend tried to rip the FCIProject to pieces because he couldn't understand the multi-threaded design and TCP/IP concepts (distributed computing) used for communications with modules. I know what I have written is based on solid programming techniques and defended what I had written. After a meeting that I will never forget I walked away from Helicopter Simulators to let them sort out the mess a 'friend' had created. I spent a lot of time working on this simulator project and it nearly killed any interest I had in flight simulators. When money gets involved it can all turn very nasty.

    It has taken me a long time to start trusting anyone when it comes to working on simulators. Thankfully the XSimulator crew are restoring my faith in people who want to work together to achieve a common goal.

    My sole aim here is to get Hugso's gSeat working with DCS and CoD. The help we have received so far has been outstanding.
    • Like Like x 2
    Last edited: Oct 12, 2013
  5. bsft

    bsft

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    no worries , we are here to help.
    As for being "f....d over" , I am sure a heap of us could fill several pages of a thread with stories of similar. :grin
  6. Hypo

    Hypo Member

    Joined:
    Oct 4, 2013
    Messages:
    50
    Occupation:
    Former cooperate enterprise software developer
    Location:
    Harlow, Essex, UK
    Balance:
    879Coins
    Ratings:
    +24 / 0 / -0
    The years of therapy have helped to get over it ;)

    And seeing the company not being able to progress from where they were a few years ago goes to prove they lost. By walking away, because it wasn't worth the stress, I effectively shut down the business.

    I learnt some hard, valuable lessons and the only way I will distribute any software I write in the future will be through official AppStores like Apple's or it will be completely Open Source and free.
    Last edited: Oct 12, 2013
  7. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Cool, the pain of development I know well been burnt by people doing similar stuff to me.

    Right back to the actual topic, so you can now control the g seat with the above code, have you been able to add the third axis ok.
    Its pretty easy to adapt the above code, even to 6DOF as a fellow simmer has achieved,please don't forget to thank the other guy Aarondc without his contribution to my first code, this would not be achievable.
    Again show what happens when the right guys get together with the right attitude to progress a communities knowledge. A big thing we like to support here. And you will find it hard to get this on any other sim site.

    Please send us a vid or something showing the control I might be able to customize it to help you control this better, hopefully wont be long and Sim Tools will be available for all to download.
  8. Hypo

    Hypo Member

    Joined:
    Oct 4, 2013
    Messages:
    50
    Occupation:
    Former cooperate enterprise software developer
    Location:
    Harlow, Essex, UK
    Balance:
    879Coins
    Ratings:
    +24 / 0 / -0
    Yes, sorry, back on topic...

    I got the Pitch servo working last night. It was great to see the servo move when I sent Pxxx~ commands :)

    Absolutely a huge thanks to Aarondc and all of the SimTools crew. Hugso and I have achieved more in a couple of days, with your help, than we have in months. The XSimulator community has been outstanding. Thank you to all of you.

    The next step is to help get Hugso's setup up and running. I will talk it through, with Hugso, what I did to get up and running and get the Pitch and Roll axis working with him. I am sure Hugso will be able to video gSeat moving when commands are sent to the Arduino.

    When we have got gSeat moving on the two axis I will look at adapting the program to add a third axis. Hugso and I are doing things one step at a time :)

    After all that the next step will be to integrate and get SimTools running with DCS or CoD and gSeat.

    Just to make one small point clear; Hugso and I are about two hundred miles apart so most of our communication is done by email or, occasionally, on the phone. This arrangement works well and we manage to work as an effective team. I know you guys are all over the world and it goes to show cooperation, respect and teamwork can achieve a lot.

    Many thanks to the XSimulator community. It is a pleasure and a honour to work with you:cheers
    Last edited: Oct 12, 2013
  9. hugso

    hugso Active Member

    Joined:
    Sep 17, 2013
    Messages:
    140
    Location:
    Glos UK
    Balance:
    611Coins
    Ratings:
    +51 / 1 / -0
    My Motion Simulator:
    Arduino, Motion platform, 4DOF
    Thanks eaorobbie for the zip. I too now have the pitch and roll servos controlled by the Arduiono. This is all very exciting for me as Hypo and I have been struggling for ages to get my cockpit moving with other sims. The next step I guess is to get Sim Tools and then the plugins for DCS World and Cliffs of Dover? When I last looked at the plugins download page they were greyed out and unavailable. Is there something I have do, like buy all you clever guys a beer or three? Please let me know if there is anything I can do to for you all to show my appreciation for your hard work an very helpful information.
  10. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Hey your cool man, we ask if people can share their new discoveries so to better the overall knowledge of the whole community, plus one of my main aims in sims is to help people realize their dreams of sims can come true and be a reality.
  11. hugso

    hugso Active Member

    Joined:
    Sep 17, 2013
    Messages:
    140
    Location:
    Glos UK
    Balance:
    611Coins
    Ratings:
    +51 / 1 / -0
    My Motion Simulator:
    Arduino, Motion platform, 4DOF

    Well, I am certainly very happy to share my practical knowledge of what works in flight sims and what doesn't. I am posting a couple of short video clips I took some years ago of my sim in action. The top part has been much improved since, but the base with the rams and servos controlling them is much the same. The longer clip shows me landing and the bumps and sway involved in that. This clip does not show any roll or pitch motion, just heave and a bit of sway. The shorter clip is a close up of the valves and rams in action. The feelings required for a flight sim are somewhat different to those required for a racing sim. Racing sims I imagine need lots of sharp bumps and lateral sway, but for flight sims the most important motions are an illusion of sustained increased g and roll. The increased g is created by thrusting the seat upwards and simultaneously inflating pressure pads under your legs. That, coupled with the visual cues, feels pretty good. The upward motion does not need to be as rapid as you would expect. For the roll motion I first tried using the roll info from the sim, but this was not realistic. It did not give an instantaneous movement and also did bizarre motions when going inverted at the top of a roll. I then used the position of the ailerons which gives a very believable motion. I have flown a light aircraft several times during development of the sim to see if I was on the right lines, and I think I have it as good as is feasible in a domestic situation. You do not need a lot of motion to do the job. It is all about cues. The roll motion I use is only about 15 degrees either way. Any more, surprisingly, did not feel so realistic. Plus you started sliding across the seat.

    I have just tried to post the video clips, but they wont drag and drop. Do I have to do something different for vids?
  12. value1

    value1 Nerd SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Jan 9, 2011
    Messages:
    2,184
    Location:
    Zug, Switzerland
    Balance:
    14,797Coins
    Ratings:
    +3,322 / 11 / -1
    My Motion Simulator:
    2DOF, DC motor, JRK, Joyrider
    Use the Media button for importing videos.
    image.jpg
  13. Hypo

    Hypo Member

    Joined:
    Oct 4, 2013
    Messages:
    50
    Occupation:
    Former cooperate enterprise software developer
    Location:
    Harlow, Essex, UK
    Balance:
    879Coins
    Ratings:
    +24 / 0 / -0
    Hi Value1

    Just thought I would take this opportunity to thank you and the SimTools team for developing SimTools. I would also like to thank everyone who has helped Hugso and I get Hugso's simulator, gSeat, working with Arduino.

    The initial testing using eaorobbie's program is done and is working very nicely. Thanks, Mate! :) The next step is for Hugso and I have access to the SimTools software and the plugin for DCS and work on configuring the software.

    How do Hugso and I get SimTools and the plugins?
  14. value1

    value1 Nerd SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Jan 9, 2011
    Messages:
    2,184
    Location:
    Zug, Switzerland
    Balance:
    14,797Coins
    Ratings:
    +3,322 / 11 / -1
    My Motion Simulator:
    2DOF, DC motor, JRK, Joyrider
    Just ask René / @RaceRay via PM to become a beta tester and he will provide you access to the program and the plugins.
  15. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Cool once ya boys gain access the fun really begins
  16. Hypo

    Hypo Member

    Joined:
    Oct 4, 2013
    Messages:
    50
    Occupation:
    Former cooperate enterprise software developer
    Location:
    Harlow, Essex, UK
    Balance:
    879Coins
    Ratings:
    +24 / 0 / -0
    Cheers, Value1 I have sent a PM to René.
  17. Hypo

    Hypo Member

    Joined:
    Oct 4, 2013
    Messages:
    50
    Occupation:
    Former cooperate enterprise software developer
    Location:
    Harlow, Essex, UK
    Balance:
    879Coins
    Ratings:
    +24 / 0 / -0
    I've got to set up my Mac Pro with Windows 7 64bit because DCS is now 64bit only. Currently got 32bit Windows installed on my Mac. Will have to change it over to 64bit.

    Then we can have some fun with DCS, SimTools and gSeat:thumbs
  18. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    ah mac bugger, prefer a real pc myself
  19. Hypo

    Hypo Member

    Joined:
    Oct 4, 2013
    Messages:
    50
    Occupation:
    Former cooperate enterprise software developer
    Location:
    Harlow, Essex, UK
    Balance:
    879Coins
    Ratings:
    +24 / 0 / -0
    I am a UNIX man at heart and Mac OS X is Unix. Nothing against PCs or Windows 7. Windows 8 is a disaster:grin

    I have built dozens of PCs and maintained lots of dedicated UNIX kit over the years. The modular nature of a PC is its biggest plus point. I have got a Mac Pro desktop and have put in SSDs drives and extra RAM. It goes like sh*t off a shovel;)
    • Like Like x 1
  20. hugso

    hugso Active Member

    Joined:
    Sep 17, 2013
    Messages:
    140
    Location:
    Glos UK
    Balance:
    611Coins
    Ratings:
    +51 / 1 / -0
    My Motion Simulator:
    Arduino, Motion platform, 4DOF

    Thanks for the info. Here are the vids I referred to.
    • Like Like x 1