You are on page 1of 32

Lampiran Program Arduino

float tempC1; int reading4;


float tempC2;
float tempC3; float referenceVoltage;
float tempC4;
int tempPin1=A0;
int reading1; int tempPin2=A1;
int reading2; int tempPin3=A2;
int reading3; int tempPin4=A3;

//FLOW
int encoder_pin = 2; // The pin the encoder is connected
unsigned int rpm; // rpm reading
unsigned int rps; // rpm reading
volatile byte pulses; // number of pulses
unsigned long timeold;
// The number of pulses per revolution
// depends on your index disc!!
unsigned int pulsesperturn = 20; //pembacaan setelah 20
counteran baru tampil
void counter()
{
//Update count
pulses++;
}
void setup () {
Serial.begin(9600);
analogReference(EXTERNAL);
referenceVoltage=3.5;
}
void loop () {
int sensorValue4 = analogRead(A4);
int sensorValue5 = analogRead(A5);
reading1=0;
reading2=0;
reading3=0;
reading4=0;

for(int i=0; i<40; i++ ) {


reading1 +=analogRead(tempPin1);
reading2 +=analogRead(tempPin2);
reading3 +=analogRead(tempPin3);
reading4 +=analogRead(tempPin4);
delay(20);
}
tempC1= (referenceVoltage*reading1*2.11)/1023;
tempC2= (referenceVoltage*reading2*2.11)/1023;
tempC3= (referenceVoltage*reading3*2.11)/1023;
tempC4= (referenceVoltage*reading4*2.11)/1023;

float teg4 = sensorValue4 * (5.0 / 1023.0);


float hum =( teg4 - 0.03) / 3 ;
float teg5 = sensorValue5 * (5.0 / 1023.0);
float bising = (5 * teg5) + 25 ;

Serial.print("A"); Serial.print("C");
Serial.print(tempC4); Serial.print(tempC2);
Serial.print("B"); Serial.print("D");
Serial.print("E"); Serial.print("I");
Serial.print(tempC3); Serial.print(hum);
Serial.print("F"); Serial.print("J");

Serial.print("G"); Serial.print("K");
Serial.print(tempC1); Serial.print(bising);
Serial.print("H"); Serial.print("L");

//FLOW
if (millis() - timeold >= 1000){ /*Uptade every one
second, this will be equal to reading frecuency (Hz).*/
//Don't process interrupts during calculations
detachInterrupt(0);
//Note that this would be 60*1000/(millis() -
timeold)*pulses if the interrupt
//happened once per revolution
rpm = ( 60*1000 / pulsesperturn );
rpm = rpm / (millis() - timeold)* pulses;
rps = rpm / 60 ; //perubahan dari rpm ke rps
float flow = (rps * 0.20114286 ) ;
timeold = millis();
pulses = 0; // reset
Serial.print("M");
Serial.print(flow,DEC);
Serial.print("N");
//Restart the interrupt processing
attachInterrupt(0, counter, FALLING);
}
delay(1000);
}
Lampiran Listing Program Delphi

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes,
Graphics, Controls, Forms,
Dialogs, StdCtrls, CPort, jpeg, ExtCtrls;
type Edit18: TEdit;
TForm1 = Edit19: TEdit;
class(TForm) Edit20: TEdit;
Button1: TButton; Edit21: TEdit;
Button2: TButton; Edit22: TEdit;
Edit1: TEdit; Edit23: TEdit;
Edit2: TEdit; Edit24: TEdit;
Edit3: TEdit; Edit25: TEdit;
Edit4: TEdit; Edit26: TEdit;
Edit5: TEdit; Edit27: TEdit;
Edit6: TEdit; Edit28: TEdit;
Edit7: TEdit; Edit29: TEdit;
Edit8: TEdit; Edit30: TEdit;
Edit9: TEdit; Edit31: TEdit;
Edit10: TEdit; Edit32: TEdit;
Edit11: TEdit; Edit33: TEdit;
Edit12: TEdit; Edit34: TEdit;
Edit13: TEdit; Edit35: TEdit;
Edit14: TEdit; Label1: TLabel;
Edit15: TEdit; Label2: TLabel;
Edit16: TEdit; Label3: TLabel;
Edit17: TEdit; Label4: TLabel;
Label5: TLabel; Terima_Kebisingan:
Label6: TLabel; TComDataPacket;
Label7: TLabel; Terima_AirFlow:
Label8: TLabel; TComDataPacket;
Label9: TLabel; Timer1: TTimer;
Label10: TLabel; Timer2: TTimer;
Label11: TLabel; Timer3: TTimer;
Label12: TLabel; Timer4: TTimer;
Label13: TLabel; Timer5: TTimer;
Label14: TLabel; Label15: TLabel;
Edit36: TEdit; Label16: TLabel;
Edit37: TEdit; Label17: TLabel;
Edit38: TEdit; Label18: TLabel;
Edit39: TEdit; Label19: TLabel;
Edit40: TEdit; Label20: TLabel;
Edit41: TEdit; Label21: TLabel;
Edit42: TEdit; Edit43: TEdit;
ComPort1: Edit44: TEdit;
TComPort; Edit45: TEdit;
Terima_T1: Edit46: TEdit;
TComDataPacket; Edit47: TEdit;
Terima_T2: Edit48: TEdit;
TComDataPacket; Edit49: TEdit;
Terima_T3: Edit50: TEdit;
TComDataPacket; Edit51: TEdit;
Terima_T4: Edit52: TEdit;
TComDataPacket; Edit53: TEdit;
Terima_Kelembapan: Edit54: TEdit;
TComDataPacket; Edit55: TEdit;
Edit56: TEdit;
Edit57: TEdit; Timer10: TTimer;
Edit58: TEdit; Label22: TLabel;
Edit59: TEdit; Label23: TLabel;
Edit60: TEdit; Label24: TLabel;
Edit61: TEdit; Label25: TLabel;
Edit62: TEdit; Button3: TButton;
Edit63: TEdit; Image1: TImage;
Edit64: TEdit; Image2: TImage;
Edit65: TEdit; Label26: TLabel;
Edit66: TEdit; Label27: TLabel;
Edit67: TEdit; Label28: TLabel;
Edit68: TEdit; Label29: TLabel;
Edit69: TEdit; Label30: TLabel;
Edit70: TEdit; Label31: TLabel;
Timer6: TTimer; Label32: TLabel;
Timer7: TTimer; Label33: TLabel;
Timer8: TTimer; Image3: TImage;
Timer9: TTimer;

procedure T1(Sender: TObject; const Str: String);


procedure T2(Sender: TObject; const Str: String);
procedure T3(Sender: TObject; const Str: String);
procedure T4(Sender: TObject; const Str: String);
procedure Kelembapan(Sender: TObject; const Str:
String);
procedure Kebisingan(Sender: TObject; const Str:
String);
procedure AirFlow(Sender: TObject; const Str:
String);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
procedure Timer3Timer(Sender: TObject);
procedure Timer4Timer(Sender: TObject);
procedure Timer5Timer(Sender: TObject);
procedure Timer6Timer(Sender: TObject);
procedure Timer7Timer(Sender: TObject);
procedure Timer8Timer(Sender: TObject);
procedure Timer9Timer(Sender: TObject);
procedure Timer10Timer(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

suhu1,suhu2,suhu3,suhu4,kelembaban,kebisingan,airflow
:integer;

implementation

{$R *.dfm}

procedure TForm1.T1(Sender: TObject; const Str:


String);
begin
if edit1.Text = '' then begin
end else if edit8.Text='' then begin
if timer1.Enabled=false then begin
edit8.Text:=edit1.Text;
timer2.Enabled:=true;
end;
end else if edit15.Text='' then begin
if timer2.Enabled = false then begin
edit15.Text:=edit8.Text;
edit8.Text:=edit1.Text;
timer3.Enabled:=true;
end;
end else if edit22.Text='' then begin
if timer3.Enabled = false then begin
edit22.Text:=edit15.Text;
edit15.Text:=edit8.Text;
edit8.Text:=edit1.Text;
timer4.Enabled:=true;
end;
end else if edit29.Text='' then begin
if timer4.Enabled = false then begin
edit29.Text:=edit22.Text;
edit22.Text:=edit15.Text;
edit15.Text:=edit8.Text;
edit8.Text:=edit1.Text;
timer5.Enabled:=true;
end;
end else if edit36.Text='' then begin
if timer5.Enabled = false then begin
edit36.Text:=edit29.Text;
edit29.Text:=edit22.Text;
edit22.Text:=edit15.Text;
edit15.Text:=edit8.Text;
edit8.Text:=edit1.Text;
edit1.Text:=str;
timer6.Enabled:=true;
end;
end else if edit43.Text='' then begin
if timer6.Enabled = false then begin
edit43.Text:=edit36.Text;
edit36.Text:=edit29.Text;
edit29.Text:=edit22.Text;
edit22.Text:=edit15.Text;
edit15.Text:=edit8.Text;
edit8.Text:=edit1.Text;
edit1.Text:=str;
timer7.Enabled:=true;
end;
end else if edit50.Text='' then begin
if timer7.Enabled = false then begin
edit50.Text:=edit43.Text;
edit43.Text:=edit36.Text;
edit36.Text:=edit29.Text;
edit29.Text:=edit22.Text;
edit22.Text:=edit15.Text;
edit15.Text:=edit8.Text;
edit8.Text:=edit1.Text;
edit1.Text:=str;
timer8.Enabled:=true;
end;
end else if edit57.Text='' then begin
if timer8.Enabled = false then begin
edit57.Text:=edit50.Text;
edit50.Text:=edit43.Text;
edit43.Text:=edit36.Text;
edit36.Text:=edit29.Text;
edit29.Text:=edit22.Text;
edit22.Text:=edit15.Text;
edit15.Text:=edit8.Text;
edit8.Text:=edit1.Text;
edit1.Text:=str;
timer9.Enabled:=true;
end;
end else if edit64.Text='' then begin
if timer9.Enabled = false then begin
edit64.Text:=edit57.Text;
edit57.Text:=edit50.Text;
edit50.Text:=edit43.Text;
edit43.Text:=edit36.Text;
edit36.Text:=edit29.Text;
edit29.Text:=edit22.Text;
edit22.Text:=edit15.Text;
edit15.Text:=edit8.Text;
edit8.Text:=edit1.Text;
edit1.Text:=str;
timer10.Enabled:=true;
end;
end;
if edit64.Text = '' then begin
edit1.Text:=str;
end;
end;

procedure TForm1.T2(Sender: TObject; const Str:


String);
begin
if edit2.Text = '' then begin
end else if edit9.Text='' then begin
if timer1.Enabled=false then begin
edit9.Text:=edit2.Text;
edit2.Text:=str;
end;
end else if edit16.Text='' then begin
if timer2.Enabled = false then begin
edit16.Text:=edit9.Text;
edit9.Text:=edit2.Text;
edit2.Text:=str;
end;
end else if edit23.Text='' then begin
if timer3.Enabled = false then begin
edit23.Text:=edit16.Text;
edit16.Text:=edit9.Text;
edit9.Text:=edit2.Text;
edit2.Text:=str;
end;
end else if edit30.Text='' then begin
if timer4.Enabled = false then begin
edit30.Text:=edit23.Text;
edit23.Text:=edit16.Text;
edit16.Text:=edit9.Text;
edit9.Text:=edit2.Text;
edit2.Text:=str;
end;
end else if edit37.Text='' then begin
if timer5.Enabled = false then begin
edit37.Text:=edit30.Text;
edit30.Text:=edit23.Text;
edit23.Text:=edit16.Text;
edit16.Text:=edit9.Text;
edit9.Text:=edit2.Text;
edit2.Text:=str;
end;
end else if edit44.Text='' then begin
if timer6.Enabled = false then begin
edit44.Text:=edit37.Text;
edit37.Text:=edit30.Text;
edit30.Text:=edit23.Text;
edit23.Text:=edit16.Text;
edit16.Text:=edit9.Text;
edit9.Text:=edit2.Text;
edit2.Text:=str;
end;
end else if edit51.Text='' then begin
if timer7.Enabled = false then begin
edit51.Text:=edit44.Text;
edit44.Text:=edit37.Text;
edit37.Text:=edit30.Text;
edit30.Text:=edit23.Text;
edit23.Text:=edit16.Text;
edit16.Text:=edit9.Text;
edit9.Text:=edit2.Text;
edit2.Text:=str;
end;
end else if edit58.Text='' then begin
if timer8.Enabled = false then begin
edit58.Text:=edit51.Text;
edit51.Text:=edit44.Text;
edit44.Text:=edit37.Text;
edit37.Text:=edit30.Text;
edit30.Text:=edit23.Text;
edit23.Text:=edit16.Text;
edit16.Text:=edit9.Text;
edit9.Text:=edit2.Text;
edit2.Text:=str;
end;
end else if edit65.Text='' then begin
if timer9.Enabled = false then begin
edit65.Text:=edit58.Text;
edit58.Text:=edit51.Text;
edit51.Text:=edit44.Text;
edit44.Text:=edit37.Text;
edit37.Text:=edit30.Text;
edit30.Text:=edit23.Text;
edit23.Text:=edit16.Text;
edit16.Text:=edit9.Text;
edit9.Text:=edit2.Text;
edit2.Text:=str;
end;
end;
if edit65.Text = '' then begin
edit2.Text:=str;
end;
end;

procedure TForm1.T3(Sender: TObject; const Str:


String);
begin
if edit3.Text = '' then begin
end else if edit10.Text='' then begin
if timer1.Enabled=false then begin
edit10.Text:=edit1.Text;
edit3.Text:=str;
end;
end else if edit17.Text='' then begin
if timer2.Enabled = false then begin
edit17.Text:=edit10.Text;
edit10.Text:=edit3.Text;
edit3.Text:=str;
end;
end else if edit24.Text='' then begin
if timer3.Enabled = false then begin
edit24.Text:=edit17.Text;
edit17.Text:=edit10.Text;
edit10.Text:=edit3.Text;
edit3.Text:=str;
end;
end else if edit31.Text='' then begin
if timer4.Enabled = false then begin
edit31.Text:=edit24.Text;
edit24.Text:=edit17.Text;
edit17.Text:=edit10.Text;
edit10.Text:=edit3.Text;
edit3.Text:=str;
end;
end else if edit38.Text='' then begin
if timer5.Enabled = false then begin
edit38.Text:=edit31.Text;
edit31.Text:=edit24.Text;
edit24.Text:=edit17.Text;
edit17.Text:=edit10.Text;
edit10.Text:=edit3.Text;
edit3.Text:=str;
end;
end else if edit45.Text='' then begin
if timer6.Enabled = false then begin
edit45.Text:=edit38.Text;
edit38.Text:=edit31.Text;
edit31.Text:=edit24.Text;
edit24.Text:=edit17.Text;
edit17.Text:=edit10.Text;
edit10.Text:=edit3.Text;
edit3.Text:=str;
end;
end else if edit52.Text='' then begin
if timer7.Enabled = false then begin
edit52.Text:=edit45.Text;
edit45.Text:=edit38.Text;
edit38.Text:=edit31.Text;
edit31.Text:=edit24.Text;
edit24.Text:=edit17.Text;
edit17.Text:=edit10.Text;
edit10.Text:=edit3.Text;
edit3.Text:=str;
end;
end else if edit59.Text='' then begin
if timer8.Enabled = false then begin
edit59.Text:=edit52.Text;
edit52.Text:=edit45.Text;
edit45.Text:=edit38.Text;
edit38.Text:=edit31.Text;
edit31.Text:=edit24.Text;
edit24.Text:=edit17.Text;
edit17.Text:=edit10.Text;
edit10.Text:=edit3.Text;
edit3.Text:=str;
end;
end else if edit66.Text='' then begin
if timer9.Enabled = false then begin
edit66.Text:=edit59.Text;
edit59.Text:=edit52.Text;
edit52.Text:=edit45.Text;
edit45.Text:=edit38.Text;
edit38.Text:=edit31.Text;
edit31.Text:=edit24.Text;
edit24.Text:=edit17.Text;
edit17.Text:=edit10.Text;
edit10.Text:=edit3.Text;
edit3.Text:=str;
end;
end;
if edit66.Text = '' then begin
edit3.Text:=str;
end;
end;

procedure TForm1.T4(Sender: TObject; const Str:


String);
begin
if edit4.Text = '' then begin
end else if edit11.Text='' then begin
if timer1.Enabled=false then begin
edit11.Text:=edit4.Text;
edit4.Text:=str;
end;
end else if edit18.Text='' then begin
if timer2.Enabled = false then begin
edit18.Text:=edit11.Text;
edit11.Text:=edit4.Text;
edit4.Text:=str;
end;
end else if edit25.Text='' then begin
if timer3.Enabled = false then begin
edit25.Text:=edit18.Text;
edit18.Text:=edit11.Text;
edit11.Text:=edit4.Text;
edit4.Text:=str;
end;
end else if edit32.Text='' then begin
if timer4.Enabled = false then begin
edit32.Text:=edit25.Text;
edit25.Text:=edit18.Text;
edit18.Text:=edit11.Text;
edit11.Text:=edit4.Text;
edit4.Text:=str;
end;
end else if edit39.Text='' then begin
if timer5.Enabled = false then begin
edit39.Text:=edit32.Text;
edit32.Text:=edit25.Text;
edit25.Text:=edit18.Text;
edit18.Text:=edit11.Text;
edit11.Text:=edit4.Text;
edit4.Text:=str;
end;
end else if edit46.Text='' then begin
if timer6.Enabled = false then begin
edit46.Text:=edit39.Text;
edit39.Text:=edit32.Text;
edit32.Text:=edit25.Text;
edit25.Text:=edit18.Text;
edit18.Text:=edit11.Text;
edit11.Text:=edit4.Text;
edit4.Text:=str;
end;
end else if edit53.Text='' then begin
if timer7.Enabled = false then begin
edit53.Text:=edit46.Text;
edit46.Text:=edit39.Text;
edit39.Text:=edit31.Text;
edit32.Text:=edit25.Text;
edit25.Text:=edit18.Text;
edit18.Text:=edit11.Text;
edit11.Text:=edit4.Text;
edit4.Text:=str;
end;
end else if edit60.Text='' then begin
if timer8.Enabled = false then begin
edit60.Text:=edit53.Text;
edit53.Text:=edit46.Text;
edit46.Text:=edit39.Text;
edit39.Text:=edit32.Text;
edit32.Text:=edit25.Text;
edit25.Text:=edit18.Text;
edit18.Text:=edit11.Text;
edit11.Text:=edit4.Text;
edit4.Text:=str;
end;
end else if edit67.Text='' then begin
if timer9.Enabled = false then begin
edit67.Text:=edit60.Text;
edit60.Text:=edit53.Text;
edit53.Text:=edit46.Text;
edit46.Text:=edit39.Text;
edit39.Text:=edit32.Text;
edit32.Text:=edit25.Text;
edit25.Text:=edit18.Text;
edit18.Text:=edit11.Text;
edit11.Text:=edit4.Text;
edit4.Text:=str;
end;
end;
if edit67.Text = '' then begin
edit4.Text:=str;
end;
end;

procedure TForm1.Kelembapan(Sender: TObject; const


Str: String);
begin
if edit5.Text = '' then begin
end else if edit12.Text='' then begin
if timer1.Enabled=false then begin
edit12.Text:=edit5.Text;
edit5.Text:=str;
end;
end else if edit19.Text='' then begin
if timer2.Enabled = false then begin
edit19.Text:=edit12.Text;
edit12.Text:=edit5.Text;
edit5.Text:=str;
end;
end else if edit26.Text='' then begin
if timer3.Enabled = false then begin
edit26.Text:=edit19.Text;
edit19.Text:=edit12.Text;
edit12.Text:=edit5.Text;
edit5.Text:=str;
end;
end else if edit33.Text='' then begin
if timer4.Enabled = false then begin
edit33.Text:=edit26.Text;
edit26.Text:=edit19.Text;
edit19.Text:=edit12.Text;
edit12.Text:=edit5.Text;
edit5.Text:=str;
end;
end else if edit40.Text='' then begin
if timer5.Enabled = false then begin
edit40.Text:=edit33.Text;
edit33.Text:=edit26.Text;
edit26.Text:=edit19.Text;
edit19.Text:=edit12.Text;
edit12.Text:=edit5.Text;
edit5.Text:=str;
end;
end else if edit47.Text='' then begin
if timer6.Enabled = false then begin
edit47.Text:=edit40.Text;
edit40.Text:=edit33.Text;
edit33.Text:=edit26.Text;
edit26.Text:=edit19.Text;
edit19.Text:=edit12.Text;
edit12.Text:=edit5.Text;
edit5.Text:=str;
end;
end else if edit54.Text='' then begin
if timer7.Enabled = false then begin
edit54.Text:=edit47.Text;
edit47.Text:=edit40.Text;
edit40.Text:=edit32.Text;
edit33.Text:=edit26.Text;
edit26.Text:=edit19.Text;
edit19.Text:=edit12.Text;
edit12.Text:=edit5.Text;
edit5.Text:=str;
end;
end else if edit61.Text='' then begin
if timer8.Enabled = false then begin
edit61.Text:=edit54.Text;
edit54.Text:=edit47.Text;
edit47.Text:=edit40.Text;
edit40.Text:=edit33.Text;
edit33.Text:=edit26.Text;
edit26.Text:=edit19.Text;
edit19.Text:=edit12.Text;
edit12.Text:=edit5.Text;
edit5.Text:=str;
end;
end else if edit68.Text='' then begin
if timer9.Enabled = false then begin
edit68.Text:=edit61.Text;
edit61.Text:=edit54.Text;
edit54.Text:=edit47.Text;
edit47.Text:=edit40.Text;
edit40.Text:=edit33.Text;
edit33.Text:=edit26.Text;
edit26.Text:=edit19.Text;
edit19.Text:=edit12.Text;
edit12.Text:=edit5.Text;
edit5.Text:=str;
end;
end;
if edit68.Text = '' then begin
edit5.Text:=str;
end;
end;

procedure TForm1.Kebisingan(Sender: TObject; const


Str: String);
begin
if edit6.Text = '' then begin
end else if edit13.Text='' then begin
if timer1.Enabled=false then begin
edit13.Text:=edit6.Text;
edit6.Text:=str;
end;
end else if edit20.Text='' then begin
if timer2.Enabled = false then begin
edit20.Text:=edit13.Text;
edit13.Text:=edit6.Text;
edit6.Text:=str;
end;
end else if edit27.Text='' then begin
if timer3.Enabled = false then begin
edit27.Text:=edit20.Text;
edit20.Text:=edit13.Text;
edit13.Text:=edit6.Text;
edit6.Text:=str;
end;
end else if edit34.Text='' then begin
if timer4.Enabled = false then begin
edit34.Text:=edit27.Text;
edit27.Text:=edit20.Text;
edit20.Text:=edit13.Text;
edit13.Text:=edit6.Text;
edit6.Text:=str;
end;
end else if edit41.Text='' then begin
if timer5.Enabled = false then begin
edit41.Text:=edit34.Text;
edit34.Text:=edit27.Text;
edit27.Text:=edit20.Text;
edit20.Text:=edit13.Text;
edit13.Text:=edit6.Text;
edit6.Text:=str;
end;
end else if edit48.Text='' then begin
if timer6.Enabled = false then begin
edit48.Text:=edit41.Text;
edit41.Text:=edit34.Text;
edit34.Text:=edit27.Text;
edit27.Text:=edit20.Text;
edit20.Text:=edit13.Text;
edit13.Text:=edit6.Text;
edit6.Text:=str;
end;
end else if edit55.Text='' then begin
if timer7.Enabled = false then begin
edit55.Text:=edit48.Text;
edit48.Text:=edit41.Text;
edit41.Text:=edit34.Text;
edit34.Text:=edit27.Text;
edit27.Text:=edit20.Text;
edit20.Text:=edit13.Text;
edit13.Text:=edit6.Text;
edit6.Text:=str;
end;
end else if edit62.Text='' then begin
if timer8.Enabled = false then begin
edit62.Text:=edit55.Text;
edit55.Text:=edit48.Text;
edit48.Text:=edit41.Text;
edit41.Text:=edit32.Text;
edit34.Text:=edit27.Text;
edit27.Text:=edit20.Text;
edit20.Text:=edit13.Text;
edit13.Text:=edit6.Text;
edit6.Text:=str;
end;
end else if edit69.Text='' then begin
if timer9.Enabled = false then begin
edit69.Text:=edit62.Text;
edit62.Text:=edit55.Text;
edit55.Text:=edit48.Text;
edit48.Text:=edit41.Text;
edit41.Text:=edit34.Text;
edit34.Text:=edit27.Text;
edit27.Text:=edit20.Text;
edit20.Text:=edit13.Text;
edit13.Text:=edit6.Text;
edit6.Text:=str;
end;
end;
if edit69.Text = '' then begin
edit6.Text:=str;
end;
end;

procedure TForm1.AirFlow(Sender: TObject; const Str:


String);
begin
if edit7.Text = '' then begin
end else if edit14.Text='' then begin
if timer1.Enabled=false then begin
edit14.Text:=edit7.Text;
edit7.Text:=str;
end;
end else if edit21.Text='' then begin
if timer2.Enabled = false then begin
edit21.Text:=edit14.Text;
edit14.Text:=edit7.Text;
edit7.Text:=str;
end;
end else if edit28.Text='' then begin
if timer3.Enabled = false then begin
edit28.Text:=edit21.Text;
edit21.Text:=edit14.Text;
edit14.Text:=edit7.Text;
edit7.Text:=str;
end;
end else if edit35.Text='' then begin
if timer4.Enabled = false then begin
edit35.Text:=edit28.Text;
edit28.Text:=edit21.Text;
edit21.Text:=edit14.Text;
edit14.Text:=edit7.Text;
edit7.Text:=str;
end;
end else if edit42.Text='' then begin
if timer5.Enabled = false then begin
edit42.Text:=edit35.Text;
edit35.Text:=edit28.Text;
edit28.Text:=edit21.Text;
edit21.Text:=edit14.Text;
edit14.Text:=edit7.Text;
edit7.Text:=str;
end;
end else if edit49.Text='' then begin
if timer6.Enabled = false then begin
edit49.Text:=edit42.Text;
edit42.Text:=edit35.Text;
edit35.Text:=edit28.Text;
edit28.Text:=edit21.Text;
edit21.Text:=edit14.Text;
edit14.Text:=edit7.Text;
edit7.Text:=str;
end;
end else if edit56.Text='' then begin
if timer7.Enabled = false then begin
edit56.Text:=edit49.Text;
edit42.Text:=edit35.Text;
edit35.Text:=edit28.Text;
edit28.Text:=edit21.Text;
edit21.Text:=edit14.Text;
edit14.Text:=edit7.Text;
edit7.Text:=str;
end;
end else if edit63.Text='' then begin
if timer8.Enabled = false then begin
edit63.Text:=edit56.Text;
edit56.Text:=edit49.Text;
edit42.Text:=edit35.Text;
edit35.Text:=edit28.Text;
edit28.Text:=edit21.Text;
edit21.Text:=edit14.Text;
edit14.Text:=edit7.Text;
edit7.Text:=str;
end;
end else if edit70.Text='' then begin
if timer9.Enabled = false then begin
edit70.Text:=edit63.Text;
edit63.Text:=edit56.Text;
edit56.Text:=edit49.Text;
edit42.Text:=edit35.Text;
edit35.Text:=edit28.Text;
edit28.Text:=edit21.Text;
edit21.Text:=edit14.Text;
edit14.Text:=edit7.Text;
edit7.Text:=str;
end;
end;
if edit70.Text = '' then begin
edit7.Text:=str;
end;
end;

procedure TForm1.Button1Click(Sender: TObject);


begin
comport1.Open;
timer1.Enabled:=true;
end;

procedure TForm1.Button2Click(Sender: TObject);


begin
edit1.Text:=''; edit16.Text:='';
edit2.Text:=''; edit17.Text:='';
edit3.Text:=''; edit18.Text:='';
edit4.Text:=''; edit19.Text:='';
edit5.Text:=''; edit20.Text:='';
edit6.Text:=''; edit21.Text:='';
edit7.Text:=''; edit22.Text:='';
edit8.Text:=''; edit23.Text:='';
edit9.Text:=''; edit24.Text:='';
edit10.Text:=''; edit25.Text:='';
edit11.Text:=''; edit26.Text:='';
edit12.Text:=''; edit27.Text:='';
edit13.Text:=''; edit28.Text:='';
edit14.Text:=''; edit29.Text:='';
edit15.Text:=''; edit30.Text:='';
edit31.Text:=''; edit51.Text:='';
edit32.Text:=''; edit52.Text:='';
edit33.Text:=''; edit53.Text:='';
edit34.Text:=''; edit54.Text:='';
edit35.Text:=''; edit55.Text:='';
edit36.Text:=''; edit56.Text:='';
edit37.Text:=''; edit57.Text:='';
edit38.Text:=''; edit58.Text:='';
edit39.Text:=''; edit59.Text:='';
edit40.Text:=''; edit60.Text:='';
edit41.Text:=''; edit61.Text:='';
edit42.Text:=''; edit62.Text:='';
edit43.Text:=''; edit63.Text:='';
edit44.Text:=''; edit64.Text:='';
edit45.Text:=''; edit65.Text:='';
edit46.Text:=''; edit66.Text:='';
edit47.Text:=''; edit67.Text:='';
edit48.Text:=''; edit68.Text:='';
edit49.Text:=''; edit69.Text:='';
edit50.Text:=''; edit70.Text:='';

comport1.Close;
timer1.Enabled:=true;
end;

procedure TForm1.Timer1Timer(Sender: TObject);


begin
timer1.Enabled:=false;
end;
procedure TForm1.Timer2Timer(Sender: TObject);
begin
timer2.Enabled:=false;
end;

procedure TForm1.Timer3Timer(Sender: TObject);


begin
timer3.Enabled:=false;
end;

procedure TForm1.Timer4Timer(Sender: TObject);


begin
timer4.Enabled:=false;
end;

procedure TForm1.Timer5Timer(Sender: TObject);


begin
timer5.Enabled:=false;
end;

procedure TForm1.Timer6Timer(Sender: TObject);


begin
timer6.Enabled:=false;
end;

procedure TForm1.Timer7Timer(Sender: TObject);


begin
timer7.Enabled:=false;
end;
procedure TForm1.Timer8Timer(Sender: TObject);
begin
timer8.Enabled:=false;
end;

procedure TForm1.Timer9Timer(Sender: TObject);


begin
timer9.Enabled:=false;
end;

procedure TForm1.Timer10Timer(Sender: TObject);


begin
timer10.Enabled:=false;
end;

procedure TForm1.Button3Click(Sender: TObject);


begin
close;
end;

end.