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 = kpa2atmpkPa;
/* send pressure to serial port */
Serial.print(pkPa);
Serial.print("kPa ");
Serial.print(pAtm);
Serial.println("Atm ");
delay(1000);
}
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👍