Hey there. I need an answer from you guys
I'm facing a design branch; creating the design for the instrument cluster is going to take some interface circuitry. Would you guys want some mildly complex microchips, or a lot of bulky transistors in the design if you're going to make it yourself? Or, if I make something that's more compact would you buy it? I don't know where to go with this so I'm looking for your input.
Hey Sorry.
Busy couple of days & nights at work.
I got the GUI to put values on separate lines, but there are still some bugs to work out.
Don't exit or pause LFS before closing the GUI program, otherwise it'll freeze.
The reason for this is because the GUI won't refresh until it gets new data. The fix is to restart or unpause LFS, then my program starts getting data again and you can exit it properly.
There are some other data values like 'pit_limiter' that show weird, incorrect values, but that's because Scawen modified the Outgauge UDP packets after Nilo wrote the UDP Packet parser for LFS in 2008.
But I'll get around to fixing those. Once that's up it should be easy to get the program to send the data over USB (I've got some code I've already written for something else laying around)
I have been updating the code (I know the stuff I gave you didn't work as it was still work-in-progress being re-purposed, but now I have working (again) code that can take data and out-put it to the python Command Output. I'm going to change some code that I've made perviously and set it up to output a data string through USB to the Arduino. That code will be happening a little later, but for now if you want some badly commented, but functioning code message me on this thread!
At the moment it's kind of broken. I've been trying to modify some parameters to send the data to a GUI as well and I haven't got it returning the proper data objects. If you're half-decent with python you can fix it no problem, I've just been coding 10 hours a day at work and haven't had the energy to finish fixing it. I will hopefully get around to having it fully functional in a couple weeks.
To run the files you put them all in one folder and run the Outgauge_GUI.py file in an python interpreter. I recommend KomodoEdit (which is free) from Active state and create a command that will run it in python.
That is the command I use, it's java so you'll have to select that in the command options. I think there was one more thing I wanted to tell you, but I forget it at the moment. If I think of it, I'll post later. Send me another message if you have any questions.
I know about the insim.txt file, but there used to be a ton of info on the LFS wiki and a trove in the forums.
An air-core 'motor' uses positive voltage to align the needle toward the positive pin. so an 8-bit PWM value of 255 at the north pole of the dial will give you up, and the same at the west pole of the air-core will give you west. but a value of 128 at the west and north pole will give you North-west.
I know I'm not doing a very good job of explaining it and I'd love to stay on and figure out a better way to explain it but I've got a very busy day tomorrow so here's a forum that has some explanations and links on it; http://www.x-simulator.de/foru ... -with-air-core-t1074.html and I promise to show you an arduino sketch later this week. as well as answer any questions you may have.
I'm working on an outgauge project myself that uses an Arduino and data from outgauge. I'm creating a program in python that parses the UDP packet information into readable data and then sends it over the USB connection to the arduino, that then sends it to an instrument cluster and/or an LCD display panel mounted in a steering wheel. The hard thing about you learning outgauge right now is that all of the documentation seems to have disappeared from the internet.
Instruments:
As for getting the tachometer to work it really depend on how it is constructed. If it is a true air-core instrument you'll need 4 PWM terminals to run it. otherwise the servor may be a better solution, it all depends on your hardware though. I have an arduino sketch that runs an air-core gauge if you'd like to have a look at my code let me know.
USB
Python doesn't have native support of using the USB interface, but there is a small extension called pyUSB that allows USB port connections and data transmission. There are certain methods for encoding the data to make sure that data isn't lost, but for my first tests I'll just use some sort of character delimitation to split up the values for the arduino.
I hope this helps. post if you have any other questions.