hsv08 wrote:
Wow Jayme that's wicked. I can't wait to see the bigger version of that!
As for xsim! I signed up and had a read. A lot there to take in!
So as far as I gather, I would download the xsim package right? Then the plugin for the sim I was wanting to extract from, then from there the plugin and xsim should broadcast the outgauges from the sim to whatever interface I would be using (arduino)?
If so and you are running xsim to arduino for your lego model, what do the out packets look like through the serial monitor before being turned into something useful?
yeah, it took me a while to figure it all out.... and some of it is still a little 'grey' lol. there wasnt a lot of documentation so many brainpowers and trial and error was involved.
https://github.com/X-Sim/X-PID-Arduino- ... or-control
this is where I started. I plan on using this for my full sized model.
for my lego model, I started a LOT simpler. x-sim has the power to take a defined 'output' and make it into an 8 bit or 16 bit value, and then spit that value up a serial port, either with or without some prefix values. I opted for no prefix value, servoA 8 bit pos, Servo B 8 bit pos, then ascii 'S' for end of command. it ends up like '90 90 53' now that ive written that down, perhaps its a bit silly as a servo value might be mistaken for hte S... oh well... its only for the lego model lol.
so the arduino code is quite simple, extract the serial data, into variables ServoA and ServoB, then do maths on it and send it to the built in RC servo control library to control the RC servos on the lego model. it worked way better than I expected it to.
its almost the same concept as the X-PID code, except that RC servos have built in position controllers, but the X-PID will use external POT's on the wiper motors and the arduino will be the 'positional brains'
anyways, X-Sim once installed, has two important parts. Extractor, which extracts the info from the game, and converter, which receives the extractor data and sends it to your defined outputs. they dont nessesarily have to be on the same machine, I plan on having a seprate laptop to run converter..
the extractor will have a wizard, to scan your games and automatically set them up with the right plugins, which are all installed automatically.
converter also had a wizard to set up the complicated maths for me. I dont think it would be terribly difficult to set up to send RPM and Speedo, as serial values to the Arduino the same as I have done for the G-Force values. they are all just game variables, and are all available to select in the X-sim Settings.
There were lots of help files avaialble to read through as well. Good Luck!
Also, the rich folks tend to go and buy 2 linear actuators called 'SCN5' (all over google) which is a serial driven high speed lienar actuator, which is used in a LOT of commercial motion sims. X-sim can directly talk to them too, without the need to use an arduino like my cheapo wiper motor method will.