Inspiration

2015 2 2

What it does

Control the crowed at Hajj

How we built it

-Hardware design & Software platform Control

Challenges we ran into

  • the current structure of the roads and bases at Mena

- people who are not registered for Hajj and how we manage their movements.

Accomplishments that we're proud of

-A unique and achievable solution

What we learned

What's next for C-023 Smart Cells

Built With

  • arduino-c
  • delphi
  • solidworks
Share this project:

Updates

posted an update

// C-023 #HajjHackathon2018

unit Unit1;

interface

uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, FMX.Controls.Presentation, FMX.Objects, FMX.Layouts, FMX.ExtCtrls;

type TForm5 = class(TForm) RoundRect6: TRoundRect; RoundRect7: TRoundRect; RoundRect8: TRoundRect; RoundRect9: TRoundRect; RoundRect10: TRoundRect; RoundRect11: TRoundRect; RoundRect13: TRoundRect; RoundRect14: TRoundRect; RoundRect15: TRoundRect; RoundRect16: TRoundRect; RoundRect17: TRoundRect; RoundRect18: TRoundRect; RoundRect19: TRoundRect; RoundRect20: TRoundRect; RoundRect21: TRoundRect; RoundRect22: TRoundRect; RoundRect23: TRoundRect; RoundRect24: TRoundRect; Timer1: TTimer; Panel1: TPanel; ImageControl1: TImageControl; RoundRect1: TRoundRect; RoundRect12: TRoundRect; RoundRect2: TRoundRect; RoundRect3: TRoundRect; RoundRect4: TRoundRect; RoundRect5: TRoundRect; Timer2: TTimer; ImageControl2: TImageControl; ImageControl3: TImageControl; ImageControl4: TImageControl; ImageControl5: TImageControl; ImageControl6: TImageControl; ImageControl7: TImageControl; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; Label7: TLabel; RoundRect25: TRoundRect; RoundRect26: TRoundRect; RoundRect27: TRoundRect; RoundRect28: TRoundRect; RoundRect29: TRoundRect; RoundRect30: TRoundRect; RoundRect31: TRoundRect; RoundRect32: TRoundRect; RoundRect33: TRoundRect; RoundRect34: TRoundRect; RoundRect35: TRoundRect; RoundRect36: TRoundRect; ImageViewer1: TImageViewer; procedure CornerButton3Click(Sender: TObject);

procedure openGate1;
    procedure openGate2;
        procedure openGate3;
            procedure openGate4;
procedure closeGate1;
    procedure closeGate2;
        procedure closeGate3;
            procedure closeGate4;



procedure Timer1Timer(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
procedure ImageControl3Click(Sender: TObject);

private { Private declarations } public { Public declarations }

end;

var Form5: TForm5;

implementation

procedure Tform5.openGate1;
var i:Integer;
begin

if RoundRect23.RotationAngle=90 then
begin
for I := 1 to 90 do
begin
RoundRect23.RotationAngle:=RoundRect23.RotationAngle+1;
RoundRect24.RotationAngle:=RoundRect24.RotationAngle-1;
Application.ProcessMessages;
sleep(2);
end;
end;

end;

    procedure Tform5.openGate2;
    var i:Integer;

begin if( RoundRect13.RotationAngle=90) and (RoundRect16.RotationAngle=90 ) then begin for I := 1 to 90 do begin RoundRect14.RotationAngle:=RoundRect14.RotationAngle-1; RoundRect13.RotationAngle:=RoundRect13.RotationAngle+1;

RoundRect15.RotationAngle:=RoundRect15.RotationAngle+1;
RoundRect16.RotationAngle:=RoundRect16.RotationAngle-1;

Application.ProcessMessages;
sleep(2);
end;

end;

end; procedure Tform5.openGate3; var i:Integer; begin if (RoundRect18.RotationAngle=90) and (RoundRect20.RotationAngle=90) then begin for I := 1 to 90 do begin RoundRect17.RotationAngle:=RoundRect17.RotationAngle-1; RoundRect18.RotationAngle:=RoundRect18.RotationAngle+1;

    RoundRect19.RotationAngle:=RoundRect19.RotationAngle+1;
RoundRect20.RotationAngle:=RoundRect20.RotationAngle-1;
Application.ProcessMessages;
sleep(2);
end;

end;

end;

            procedure Tform5.openGate4;
            var i:Integer;

begin if RoundRect21.RotationAngle=90 then begin for I := 1 to 90 do begin RoundRect21.RotationAngle:=RoundRect21.RotationAngle-1; RoundRect22.RotationAngle:=RoundRect22.RotationAngle+1; Application.ProcessMessages; sleep(2); end; end;

end;

procedure Tform5.closeGate1;
var i:Integer;

begin if RoundRect23.RotationAngle=180 then begin for I := 1 to 90 do begin RoundRect23.RotationAngle:=RoundRect23.RotationAngle-1; RoundRect24.RotationAngle:=RoundRect24.RotationAngle+1; Application.ProcessMessages; sleep(2); end; end;

end; procedure Tform5.closeGate2; var i:Integer; begin if (RoundRect13.RotationAngle=180) and (RoundRect15.RotationAngle=180) then begin for I := 1 to 90 do begin RoundRect14.RotationAngle:=RoundRect14.RotationAngle+1; RoundRect13.RotationAngle:=RoundRect13.RotationAngle-1;

    RoundRect15.RotationAngle:=RoundRect15.RotationAngle-1;
RoundRect16.RotationAngle:=RoundRect16.RotationAngle+1;
Application.ProcessMessages;
sleep(2);
end;

end;

end;

        procedure Tform5.closeGate3;
        var i:Integer;

begin if ( RoundRect18.RotationAngle=180) and (RoundRect18.RotationAngle=180 ) then begin for I := 1 to 90 do begin RoundRect17.RotationAngle:=RoundRect17.RotationAngle+1; RoundRect18.RotationAngle:=RoundRect18.RotationAngle-1;

RoundRect19.RotationAngle:=RoundRect19.RotationAngle-1;
RoundRect20.RotationAngle:=RoundRect20.RotationAngle+1;
Application.ProcessMessages;
sleep(2);
end;

end;

end;

            procedure Tform5.closeGate4;
            var i:Integer;

begin if RoundRect22.RotationAngle=180 then begin for I := 1 to 90 do begin RoundRect21.RotationAngle:=RoundRect21.RotationAngle+1; RoundRect22.RotationAngle:=RoundRect22.RotationAngle-1; Application.ProcessMessages; sleep(2); end; end;

end;

{$R *.fmx}

procedure TForm5.CornerButton3Click(Sender: TObject); var i:Integer; begin if( RoundRect13.RotationAngle=90) and (RoundRect16.RotationAngle=90 ) then begin for I := 1 to 90 do begin RoundRect14.RotationAngle:=RoundRect14.RotationAngle-1; RoundRect13.RotationAngle:=RoundRect13.RotationAngle+1;

RoundRect15.RotationAngle:=RoundRect15.RotationAngle+1;
RoundRect16.RotationAngle:=RoundRect16.RotationAngle-1;

Application.ProcessMessages;
sleep(2);
end;

end;

end;

procedure TForm5.ImageControl3Click(Sender: TObject); var i:integer; a:integer; begin a:=StrToInt((Form5.ImageControl3.Position.x).ToString); for I := a downto 0 do begin if ImageControl3.Position.x<0 then begin ImageControl3.Visible:=false; break; end; ImageControl3.Position.x:=ImageControl3.Position.x-2; sleep(2); Application.ProcessMessages;

end;

end;

procedure TForm5.Timer1Timer(Sender: TObject); begin openGate1; sleep(1000); openGate2;

sleep(1000); openGate3; sleep(1000); openGate4; sleep(1000);

closeGate1; sleep(1000); closeGate2;

sleep(1000); closeGate3; sleep(1000); closeGate4; sleep(3000); Timer1.Enabled:=False;

end;

procedure TForm5.Timer2Timer(Sender: TObject); begin Panel1.Position.X:=Panel1.Position.X-2; Timer2.Enabled:=False; end;

end.

Log in or sign up for Devpost to join the conversation.

posted an update

unit Unit6;

interface

uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Controls.Presentation, FMX.StdCtrls, FMX.Ani, FMX.Objects, FMX.Layouts, FMX.ExtCtrls;

type TForm6 = class(TForm) Layout1: TLayout; Timer1: TTimer; RoundRect1: TRoundRect; RoundRect3: TRoundRect; RoundRect4: TRoundRect; RoundRect5: TRoundRect; RoundRect6: TRoundRect; RoundRect7: TRoundRect; RoundRect8: TRoundRect; RoundRect9: TRoundRect; RoundRect10: TRoundRect; RoundRect11: TRoundRect; RoundRect13: TRoundRect; RoundRect14: TRoundRect; RoundRect15: TRoundRect; RoundRect16: TRoundRect; RoundRect17: TRoundRect; RoundRect18: TRoundRect; RoundRect19: TRoundRect; RoundRect20: TRoundRect; RoundRect21: TRoundRect; RoundRect22: TRoundRect; CornerButton1: TCornerButton; CornerButton2: TCornerButton; CornerButton3: TCornerButton; CornerButton4: TCornerButton; CornerButton5: TCornerButton; CornerButton6: TCornerButton; CornerButton7: TCornerButton; CornerButton8: TCornerButton; CornerButton9: TCornerButton; CornerButton10: TCornerButton; CornerButton11: TCornerButton; CornerButton12: TCornerButton; RoundRect23: TRoundRect; RoundRect24: TRoundRect; RoundRect2: TRoundRect; RoundRect12: TRoundRect; procedure CornerButton1Click(Sender: TObject); procedure CornerButton2Click(Sender: TObject); procedure CornerButton5Click(Sender: TObject); procedure CornerButton6Click(Sender: TObject); procedure CornerButton10Click(Sender: TObject); procedure CornerButton9Click(Sender: TObject); procedure CornerButton3Click(Sender: TObject); procedure CornerButton4Click(Sender: TObject); procedure CornerButton8Click(Sender: TObject); procedure CornerButton7Click(Sender: TObject); procedure CornerButton11Click(Sender: TObject); procedure CornerButton12Click(Sender: TObject); private { Private declarations } public { Public declarations } end;

var Form6: TForm6;

implementation

{$R *.fmx}

procedure TForm6.CornerButton10Click(Sender: TObject); var i:Integer; begin if RoundRect19.RotationAngle=180 then begin for I := 1 to 90 do begin RoundRect19.RotationAngle:=RoundRect19.RotationAngle-1; RoundRect20.RotationAngle:=RoundRect20.RotationAngle+1; Application.ProcessMessages; sleep(2); end; end;

end;

procedure TForm6.CornerButton11Click(Sender: TObject); var i:Integer; begin if RoundRect21.RotationAngle=90 then begin for I := 1 to 90 do begin RoundRect21.RotationAngle:=RoundRect21.RotationAngle-1; RoundRect22.RotationAngle:=RoundRect22.RotationAngle+1; Application.ProcessMessages; sleep(2); end; end;

end;

procedure TForm6.CornerButton12Click(Sender: TObject); var i:Integer; begin for I := 1 to 90 do begin RoundRect21.RotationAngle:=RoundRect21.RotationAngle+1; RoundRect22.RotationAngle:=RoundRect22.RotationAngle-1; Application.ProcessMessages; sleep(2); end;

end;

procedure TForm6.CornerButton1Click(Sender: TObject); var i:Integer; begin if RoundRect23.RotationAngle=90 then begin for I := 1 to 90 do begin RoundRect23.RotationAngle:=RoundRect23.RotationAngle+1; RoundRect24.RotationAngle:=RoundRect24.RotationAngle-1; Application.ProcessMessages; sleep(2); end; end;

end;

procedure TForm6.CornerButton2Click(Sender: TObject); var i:Integer; begin if RoundRect23.RotationAngle=180 then begin for I := 1 to 90 do begin RoundRect23.RotationAngle:=RoundRect23.RotationAngle-1; RoundRect24.RotationAngle:=RoundRect24.RotationAngle+1; Application.ProcessMessages; sleep(2); end; end;

end;

procedure TForm6.CornerButton3Click(Sender: TObject); var i:Integer; begin if RoundRect13.RotationAngle=90 then begin for I := 1 to 90 do begin RoundRect14.RotationAngle:=RoundRect14.RotationAngle-1; RoundRect13.RotationAngle:=RoundRect13.RotationAngle+1; Application.ProcessMessages; sleep(2); end; end;

end;

procedure TForm6.CornerButton4Click(Sender: TObject); var i:Integer; begin for I := 1 to 90 do begin RoundRect14.RotationAngle:=RoundRect14.RotationAngle+1; RoundRect13.RotationAngle:=RoundRect13.RotationAngle-1; Application.ProcessMessages; sleep(2); end;

end;

procedure TForm6.CornerButton5Click(Sender: TObject); var i:Integer; begin if RoundRect16.RotationAngle=90 then begin for I := 1 to 90 do

begin
RoundRect15.RotationAngle:=RoundRect15.RotationAngle+1;
RoundRect16.RotationAngle:=RoundRect16.RotationAngle-1;
Application.ProcessMessages;
sleep(2);
end;

end;

end;

procedure TForm6.CornerButton6Click(Sender: TObject); var i:Integer; begin if RoundRect15.RotationAngle=180 then begin for I := 1 to 90 do begin RoundRect15.RotationAngle:=RoundRect15.RotationAngle-1; RoundRect16.RotationAngle:=RoundRect16.RotationAngle+1; Application.ProcessMessages; sleep(2); end; end;

end;

procedure TForm6.CornerButton7Click(Sender: TObject); var i:Integer; begin if RoundRect18.RotationAngle=90 then begin for I := 1 to 90 do begin RoundRect17.RotationAngle:=RoundRect17.RotationAngle-1; RoundRect18.RotationAngle:=RoundRect18.RotationAngle+1; Application.ProcessMessages; sleep(2); end; end;

end;

procedure TForm6.CornerButton8Click(Sender: TObject); var i:Integer; begin for I := 1 to 90 do begin RoundRect17.RotationAngle:=RoundRect17.RotationAngle-1; RoundRect18.RotationAngle:=RoundRect18.RotationAngle+1; Application.ProcessMessages; sleep(2); end;

end;

procedure TForm6.CornerButton9Click(Sender: TObject); var i:Integer; begin if RoundRect20.RotationAngle=90 then begin for I := 1 to 90 do begin RoundRect19.RotationAngle:=RoundRect19.RotationAngle+1; RoundRect20.RotationAngle:=RoundRect20.RotationAngle-1; Application.ProcessMessages; sleep(2); end; end;

end;

end.

Log in or sign up for Devpost to join the conversation.

posted an update

//C-023 Smart Cells //HajjHackathon2018 //Code for get data from all sensors of cells (ports,area State,Hamla cmd)

define NC 100

define NP 100

define NH 20

define NS 220

bool cells[NC]; bool port[NP]; int hamlaIn[NH]; int allSensors[NS];

void updateSensors(); void sendData(); void setup() { for(int i=0;i<NC ;i++){pinMode(i,INPUT);} for(int i=NC;i<NC+NP ;i++){pinMode(i,INPUT);}
for(int i=NP;i<NP+NH ;i++){pinMode(i,INPUT);}
Serial.begin(9600); }

void loop() { updateSensors(); sendData();

}

void updateSensors() { for(int i=0;i<NC ;i++) { allSensors[i]=digitalRead(i); } for(int i=NC;i<NC+NP ;i++) { allSensors[i]=digitalRead(i); }
for(int i=NP;i<NP+NH ;i++) { allSensors[i]=digitalRead(i); } }

void sendData() { for(int i=0;i<NS;i++) Serial.print(allSensors[i]);
}

Log in or sign up for Devpost to join the conversation.