Go Back   EcoModder Forum > EcoModding > Instrumentation > OpenGauge / MPGuino FE computer
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 01-31-2011, 03:44 AM   #1 (permalink)
EcoModding Apprentice
 
gtkid2002's Avatar
 
Join Date: Feb 2009
Location: USA - WA
Posts: 110

The Bug - '69 Volkswagen Bug Base
Thanks: 6
Thanked 0 Times in 0 Posts
Dual SAE/Metric Mpguino Display Help

Howdy!

I tend to travel into Canada a bit, and due to the fact that my car has those tiny friggin kph markings on the speedo, it makes it rather awkward to read at 4am, in another country, on a road you've only been on once before. Just for reference, I'm rockin a base model (no tach, power locks haha) 2001 Honda Civic.

So I was thinking since I suck at conversions in my head (Mph - Kph), I was thinking about adding a custom screen that displayed Instant Speed in KPH and Instant MPG in well, MPG. I don't care if it's set up in a four slot thing and two slots are left blank on the screen.

The problem is, I don't even know where to start. I'm waiting on getting my Arduino in the mail tomorrow (if USPS is worth their salt, and they're already late), but I have dinked with code before a little (Prior thread, Super MPGuino, kinda died), so I'm not totally clueless.

Would it be best just to use the stock code for calibration purposes, then modify the main "MPH" to be "KPH" so it's accurate, and just use my normal speedometer till I hit the border?

OR?

Add something like "unsigned long instantKPH ();" and then insert that into the "custom" screen page to replace InstantMPH?

If it's not obvious though, I don't know diddly about coding. I am trying to learn, but sadly I learn by example, then hands on. Otherwise I just butcher things by putting them willy nilly, and it takes me years to figure out what could have been told to me in ten minutes.

__________________
I suck at coding! Woo!

1969 VW Bug - Daily Driver
1975 VW Baja - Current Project
Priors:
1989 Honda Prelude Si 4WS (RIP)
1995 Honda Prelude Si (Traded)
1980 Fiat Spider 2000 (Sold)
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 01-31-2011, 09:48 AM   #2 (permalink)
EcoModding Apprentice
 
meelis11's Avatar
 
Join Date: Feb 2009
Location: Estonia
Posts: 199

Green frog - '97 Audi A4 Avant 1.9TDI 81kW
Diesel
90 day: 43.1 mpg (US)
Thanks: 19
Thanked 40 Times in 28 Posts
Would be easier to just make paper where you write mph-kph side-by-side (example in 5 kph increments)

But for tech people, paper is not acceptable :P
It is not so hard to make some custom functions there. that 64bit math makes thing little harder though.

basically you make function like this (probaby dont even need 64bit math)

unsigned long instantkph()
{
unsigned long kph = instantmph(); // 60.54 mph is 60540
kph = kph / 1.609344; // result should be 37617 so it means 37.61 km/h

return kph;
}

if you want, you can make extra screen for this purpose (not hard at all), but easier at first is to use custom screen - replace there some slot with instantkph()
  Reply With Quote
The Following User Says Thank You to meelis11 For This Useful Post:
gtkid2002 (02-02-2011)
Old 01-31-2011, 12:22 PM   #3 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
FYI, the cpp (used with the prebuilt) has a metric mode.
http://opengauge.googlecode.com/svn/...no/mpguino.cpp
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 02-02-2011, 06:39 AM   #4 (permalink)
EcoModding Apprentice
 
gtkid2002's Avatar
 
Join Date: Feb 2009
Location: USA - WA
Posts: 110

The Bug - '69 Volkswagen Bug Base
Thanks: 6
Thanked 0 Times in 0 Posts
I probably should have studied a bit more into the code... The metric speed and SAE speed are both listed as "S ". I'm gonna take a guess and say I can't switch it.

meelis11 - I tried inputting that bit of code after the "unsigned long" area right after the mph, and it threw an error.

I've tried tweaking it a little bit, and can't get it to work still. It won't compile. I know to add some stuff like (); at the end of things (They're kind of like a period I think), but I really don't know what I'm doing.

Little more help for the code n00b?
__________________
I suck at coding! Woo!

1969 VW Bug - Daily Driver
1975 VW Baja - Current Project
Priors:
1989 Honda Prelude Si 4WS (RIP)
1995 Honda Prelude Si (Traded)
1980 Fiat Spider 2000 (Sold)
  Reply With Quote
Old 02-02-2011, 08:19 AM   #5 (permalink)
EcoModding Apprentice
 
meelis11's Avatar
 
Join Date: Feb 2009
Location: Estonia
Posts: 199

Green frog - '97 Audi A4 Avant 1.9TDI 81kW
Diesel
90 day: 43.1 mpg (US)
Thanks: 19
Thanked 40 Times in 28 Posts
I dont understand where you writed and what you writed there
anyway you should look this reference Arduino - Reference
  Reply With Quote
Old 02-06-2011, 10:50 AM   #6 (permalink)
EcoModding Apprentice
 
gtkid2002's Avatar
 
Join Date: Feb 2009
Location: USA - WA
Posts: 110

The Bug - '69 Volkswagen Bug Base
Thanks: 6
Thanked 0 Times in 0 Posts
Well, I basically tried inputting that in the group of "unsigned longs" on (roughly) line 294. Didn't replace any code, just tried adding to it.

What I tried to do with what you wrote was put it straight into the code, and that didn't work, so I tried adding the end pieces (Like the (); and stuff), but I wasn't really able to figure it out.

Now I'm trying to add RPM to just straight Vanilla code. I'm trying to basically duplicate the same commands for VSS, in the same area as the PWM, just on pin 2 instead of 0. Might make another split thread, or just post it on my Super-MPGuino thread.

And yes, I know it's not really staying true to the basic MPGuino, but why not be able to have options with what you put in your car, maybe a little bit tweaked to suit one's needs.

__________________
I suck at coding! Woo!

1969 VW Bug - Daily Driver
1975 VW Baja - Current Project
Priors:
1989 Honda Prelude Si 4WS (RIP)
1995 Honda Prelude Si (Traded)
1980 Fiat Spider 2000 (Sold)
  Reply With Quote
Reply  Post New Thread






Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com