MPX4115 is not working in proteus 8

Hello everyone
I have a problem in MPX4115 pressure sensor the readings are not changing if i increase or decrease the value on pressure sensor
I watch a video on YouTube and i did the exacts same connection.
This the code:

#define kpa2atm 0.00986923267

// pin defs
int pressurePin = 0;

// variables
int val;
float pkPa; // pressure in kPa
float pAtm; // pressure in Atm

unsigned long time;

void setup()
{
Serial.begin(9600);

}

void loop()
{

/* get the pressure /
val = analogRead(pressurePin);
pkPa = ((float)val/(float)1023+0.095)/0.009;
pAtm = kpa2atm
pkPa;

/* send pressure to serial port */
Serial.print(pkPa);
Serial.print("kPa ");
Serial.print(pAtm);
Serial.println("Atm ");
delay(1000);
}

This is the link of the video

Please help me Thanks alot..

Hi, @daniakamal
Welcome to the forum.

Try:

int pressurePin = A0;

Thanks... Tom... :grinning: :+1: :coffee: :australia:

1 Like

I have try it.. not working :sweat_smile:

I found that the problem was in libraries of proteus 8, so i have proteus 7.7 and i have tried to connect the circuit and its worked in proteus 7.7!
So i copied and pested the libraries of proteus 7.7 to proteus 8
I hope this help anyone lost like me👍

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.