Helpful Information
 
 
Category: Embedded Programming
Embedded Arm7 Programming For Lpc2148

Hi,
I have written a code in c++ but due to my lack of knowledge in embedded programming for lpc2148 i am not able to do it...
I would like to get this code converted into embedded.... urgently required...
the code is as follows.


#include<iostream.h>
#include<conio.h>
#include<dos.h>
float ph,ph_new,valve1,valve2,err=0;
void main()
{
clrscr();
Again:
cout<<"\nEnter the ph"<<endl;
cin>>ph;
ph=ph+err;
if (ph<7 && ph>4.9)
{
valve1=(350-(50*ph));
cout<<"The valve opening is"<<valve1 <<endl;
delay(2000);
}
else
if (ph>7.5 && ph<9.1)
{
valve2=((100*ph)-760)/1.4;
cout<<"The valve opening is"<<valve2 <<endl;
delay(2000);
}
else
{
cout<<"\nInvalid Input"<<endl;
}
cout<<"\nThe current value of ph is";
cin>>ph_new;
err=ph_new-7;
goto Again;

}










privacy (GDPR)