View Single Post
Old 06-02-2013, 01:52 PM   #73 (permalink)
alvin_wj
EcoModding Lurker
 
Join Date: May 2013
Location: Indonesia
Posts: 8
Thanks: 4
Thanked 0 Times in 0 Posts
Hello all. My name is Alvin, im from Indonesia.

I just finish putting the my own MPGuino in my 96 Civic (D16Y8 i guess).
Currently I'm putting the +12V line after the ignition. Is it make the MPGuino doesn't save the last value for BIG Curr KM/L ?
I'm quiet curious if i put the +12V line directly to the battery. How did the MPGuino turn it self to off? I'm testing the MPGuino with a 12V power supply. After 7 minutes (420sec / 420000000 uSec), it just turn off the LED but not the display.

Last, im very interested to have some temperature reading in the menu. Can some one help me?

I have the code. It's really simple and just using 2x LM35 and the 1 & 2 analog pin.

Quote:
#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

const int inPin = 1;
const int potPin = 2;

byte degree[8] = {
0b01110,
0b01010,
0b01110,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000
};

void setup()
{
lcd.createChar(1, degree);
lcd.begin(16, 2);
}
void loop()
{
int value = analogRead(inPin);
int hasil = analogRead(potPin);
lcd.setCursor(0, 1);
float millivolts = (value / 1024.0) * 5000;
float millivolt = (hasil / 1024.0) * 5000;
float celsius = millivolts / 10;
float celcius = millivolt / 10;
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Intake ");
lcd.print(celsius);
lcd.write(1);
lcd.print("C");
lcd.setCursor(0,1);
lcd.print("Eng.Bay ");
lcd.print(celcius);
lcd.write(1);
lcd.print("C");
delay(500);
}
Can anyone help me to put this code into the MPGuino 0.81 ?
I'm still confuse with the menu thing in the code.


regards

Alvin

Last edited by alvin_wj; 06-02-2013 at 02:06 PM..
  Reply With Quote