Fuel Gauge Converter


hey guys, long time arduino fan haven't been playing recently.

my project this, want device inputs resistance , outputs another. have gas tank in old car(260z) more modern car. gauge on car reads 90ohms(empty) 10ohms(full) sender in new tank 33ohms(empty) 270ohms(full)

i able use ohm reading program got online read ohms coming in , able modify bit convert value appropriate value stock car gauge.

now stuck on how output resistance? how send value stock car gauge? plan use attiny85. appreciated.

code

int analogpin= 2;
int raw= 0;
int vin= 5;
float vout= 0;
float r1= 330;
float r2= 0;
float buffer= 0;
float datout=0;

void setup()
{

}

void loop()
{
raw= analogread(analogpin);
if(raw)
{
buffer= raw * vin;
vout= (buffer)/1024.0;
buffer= (vin/vout) -1;
r2= r1 * buffer;
datout= ((-0.3376*r2)+101.14); //this output need send
}
 

delay(1000);
}

digital potentiometer ?


Arduino Forum > Using Arduino > Project Guidance > Fuel Gauge Converter


arduino

Comments

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino Uno not uploading

Indesign and MathType fonts