0% found this document useful (0 votes)
50 views46 pages

cp4291 Iot Lab Manual Compressed

iot lab manual
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
50 views46 pages

cp4291 Iot Lab Manual Compressed

iot lab manual
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 46
Exno:l Develop an application for LED Blink and Pattern using Arduino. Date : Aim: To write a Program for develop an application for LED Blink and Pattern using Arduino. Algorthim/ Procedure: Step 1: Program the Arduino Step 2: First connect a jumper wire from GND to the negative rail on the breadboard. Step 3: First, plug a wire from 13 on the Arduino to the top row on the breadboard. Step 4: Next, plug a wire from 12 on the Arduino to the top row on the breadboard. Step 5: Then plug a wire from 11 on the Arduino to the top row on the breadboard. Step 6: Space these out well. Use the picture to help you. Step 7: Now connect a wire going from the negative rail to the right of the other wires on the breadboard. Step 8: Lastly, put the longer leg of the Led (+) under the wire that goes to the Arduino, The shorter leg of the LED goes under the port that connects to the negative rail. Program: int led = 13: int led: int led3 = 11; // the setup routine runs once when you press reset: //nitialize the digital pin as an output. pinMode(led, OUTPUT): pinMode(led2, OUTPUT); pinMode(led3, OUTPUT): } //the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(100); // wait for a second digitalWrite(led, LOW); _// turn the LED off by making the voltage LOW delay(100); {digitalWrite(led2, HIGH); delay(100); digitalWrite(led2, LOW): delay(100);} {digitalWrite(led3, HIGH); delay(100); digitalWrite(led3, LOW); delay(100);}// wait for a second } Output: Result: Thus the LED Blink and Pattern using Arduino was verified successfully completed. Ex.no :2 Develop an application for LED Pattern with Push Button Control using Arduino or Raspberry Pi. Date: . perry Aim: To write a Program for develop an application for LED Pattern with Push Button Control using Arduino or Raspberry Pi. Algorthim/ Procedure: Step 1: To make a Connection of Push Button. Step | in| to SV of Arduino. Step 1. tor 10k B/w Pin2 of Push Btn & GND of Arduino. Step 1.3: Pin2 is also connected to D6 of Arduino. Step 2: To make a Connection of LED. Step 2.1: Connect All -VE of LED To GND to Arduino. Step 3: To make a Connection of Resistors. Step 3.1:All Resistor’s to +VE of LED and then 7,D8,D9,D10,D11,D12,D13 of Arduino. Step 4: Finally Upload code. Program: int LI = 13; int L2 = 12; int L3 = 11; int L4 = 10; int L5 = 9; int L6=8; int L7 =7; //7 LED pin int buttonPin = 6; //the number of the pushbutton pin int de=50; // delay time int p=0; // variable for pattem int buttonState = 0; // variable for reading the pushbutton status void setup() { pinMode(L1, OUTPUT); pinMode(L2, OUTPUT); pinMode(L3, OUTPUT); pinMode(L4, OUTPUT); pinMode(L5, OUTPUT); pinMode(L6, OUTPUT); pinMode(L7, OUTPUT); pinMode(buttonPin, INPUT); } void loop() { buttonState = digitalRead(buttonPin); if (buttonState == HIGH) { ptt: delay(2000); } if(p==1) { digitalWrite(L1,1); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,0); delay(de); digitalWrite(L1,0); digitalWrite(L2, 1); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,0); delay(de); digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3,1); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,0); delay(de); 2 3 digitalWrite(L 1,0); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(L4,1); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,0); 4 delay(de); digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(4,0); digitalWrite(L5.1): digitalWrite(L6,0); digitalWrite(L7,0); //5 delay(de); digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5.0); digitalWrite(L6,1); digitalWrite(L7,0); /6 delay(de); digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,1); delay(de); } if(p==2) { digitalWrite(L1.0); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,1); delay(de); digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3,0); ‘7 digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,1); digitalWrite(L7,0); delay(de); digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,1); digitalWrite(L6,0); digitalWrite(L7,0); delay(de); digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(L4, 1); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,0); delay(de); digitalWrite(L1,0); digitalWrite(1.2,0); ‘6 S 4 digitalWrite(L3,1); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7.0); delay(de); digitalWrite(L1,0); digitalWrite(L2,1); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7.0); delay(de); digitalWrite(L1,1); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7.0); delay(de); } 3 ri 1 if(p==3) { digitalWrite(L1,1); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,0); delay(de); digitalWrite(L1,0); digitalWrite(L2,1); digitalWrite(L3.0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,0); delay(de); digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3,1); digitalWrite(L4,0); digitalWrite(L5,0); 1 2 digitalWrite(L6,0); digitalWrite(L7,0); delay(de); digitalWrite(L1,0); digitalWrite(L2.0); digitalWrite(L3,0); digitalWrite(L4,1); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,0); delay(de); digitalWrite(L1,0); digitalWrite(L2.0); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,1); digitalWrite(L6,0); digitalWrite(L7,0); delay(de); digitalWrite(L1,0); digitalWrite(L2.0); digitalWrite(L3,0); digitalWrite(L4,0); 4 5 digitalWrite(L5,0); digitalWrite(L6,1); digitalWrite(L7,0); delay(de); digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7.1); delay(de); digitalWrite(L1.0); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,1); digitalWrite(L7,0); delay(de); digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3,0); a HT digitalWrite(L4,0); digitalWrite(L5,1); digitalWrite(L6,0); digitalWrite(L7,0); delay(de); digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(L4,1); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,0); delay(de); digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3,1); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,0); delay(de); digitalWrite(L1,0); digitalWrite(L2,1); 'S 4 3 digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(6,0); digitalWrite(L7,0); 2 delay(de); } if(p==4) { digitalWrite(L1,1); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,1); //1,7 delay(de); digitalWrite(L1,0); digitalWrite(L2,1); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,1); digitalWrite(L7,0); //2,6 delay(de); digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3,1); digitalWrite(L4,0); digitalWrite(L5,1); digitalWrite(L6,0); digitalWrite(L7,0); //3,5 delay(de); digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3.0); digitalWrite(L4,1); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,0); 4 delay(de); } if(p==5) { digitalWrite(L 1,0); digitalWrite(L.2,0); digitalWrite(L3,0); digitalWrite(L4,1); digitalWrite(L5,0); digitalWrite(6,0); digitalWrite(L7,0); 4 delay(de); digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3,1); digitalWrite(L4,0); digitalWrite(L5.1); digitalWrite(L6,0); digitalWrite(L7.0); //3,5 delay(de); digitalWrite(L1,0); digitalWrite(L2,1); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6, 1); digitalWrite(L7.0); /2,6 delay(de); digitalWrite(L1,1); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,1); //1,7 delay(de); } if(p==6) { digitalWrite(L1.1); delay(de); digitalWrite(L2.1): delay(de); digitalWrite(L3,1); delay(de); digitalWrite(L4, 1); delay(de); digitalWrite(L5,1); delay(de); digitalWrite(L6,1); delay(de); digitalWrite(L7,1); //1,7 delay(de); digitalWrite(L7,0); 1,7 delay(de); digitalWrite(1.6,0); delay(de); digitalWrite(L5,0); delay(de); digitalWrite(L4,0); delay(de); digitalWrite(L3,0); delay(de); digitalWrite(1.2,0); delay(de); digitalWrite(L1,0); delay(de); } if(p==7) { digitalWrite(L1,0); digitalWrite(L2,0); digitalWrite(L3,0); digitalWrite(L4,0); digitalWrite(L5,0); digitalWrite(L6,0); digitalWrite(L7,0); //1,7 p=0; Result: Thus the LED Pattern with Push Button Control using Arduino was verified successfully completed. Ex.no:3 Develop an application for LM35 Temperature sensor to display temperature values using arduino. Date: Aim: To write a program for develop an application for LM35 Temperature sensor to display temperature values using arduino. Algorthim/ Procedure: Overview of LM35: M35 is a temperature sensor which can measure temperature in the range of -55°C to 150°C. Itis a 3-terminal device that provides analog voltage proportional to the temperature. Higher the temperature, higher is the output voltage. The output analog voltage can be converted to digital form using ADC so that a microcontroller can process it. Connection Diagram of LM35 Temperature Sensor With Arduino: Measuring the temperature of surroundings using LM35 and displaying it on the serial monitor of Arduino. Here, LM35 output is given to analog pin Al of Arduino UNO. This analog voltage is converted to its digital form and processed to get the temperature reading, Program: const int Im35_pin = A1; /* LM35 O/P pin */ void setup() { Serial.begin(9600); } void loop() { int temp_adc_val; float temp_val; temp_adc_val = analogRead(Im35_pin); _/* Read Temperature */ temp_val = (temp_adc_val * 4.88); /* Convert ade value to equivalent voltage */ temp_val = (temp_val/10);_ /* LM35 gives output of L0mv/°C */ Serial print("Temperature ="); Serial.print(temp_val); Serial.print(" Degree Celsius\n"); delay(1000); } Result: Thus the LM35 Temperature sensor to display temperature values using arduino was verified successfully completed. Ex.no:4 Develop an application for forest fire detection end node using Raspberry Pi device and sensor. Date: Aim: To write a program for develop an application for forest fire detection end node using Raspberry Pi device and sensor. Algorithm: Step 1: Sign up for Thingspeak. Step 2: Sign in to Thingspeak. Step 3: Record the Credentials. Step 4: Add widgets to your GUI Step 5: To test the prototype, first, the Microsim needs to be inserted in the SIM800L slot as shown in the figure. Step 6: Then power ON the module and then we can see the LED blinking in the Module. Step 7: If the LED blinking is delayed as compared to the initial start, it means it got the network, and is ready to connect to the server. Step 8:Now we can see the status in Thingspeak server. Program: #include SoftwareSerial gprsSerial(10, 11); #include int flag = 0; void setup() { pinMode(9, OUTPUT); pinMode(12, INPUT); gprsSerial. begin(9600); // the GPRS baud rate Serial.begin(9600); _// the GPRS baud rate Module_Init(); } void loop() { if (gprsSerial.available()) Serial.write(gprsSerial.read()); int fire = digitalRead(12); if (fire == 0) { digitalWrite(9, HIGH); gprsSerial.printin("AT+CIPSTART=\"TCP\",\"api.thingspeak.com\",\"80\"),//start up the connection delay(6000); ShowSerialData(); gprsSerial.printIn("AT+CIPSEND");//begin send data to remote server delay(4000); ShowSerialDataQ); String str = "GET https://api.thingspeak.com/update ?api_key=ER43PXX XXXHQPOI&field1=" + String(1); Serial.printIn(str); gprsSerial.printIn(str);//begin send data to remote server delay(4000); ShowSerialData(); digitalWrite(, LOW); gprsSerial. printIn((char)26);//sending delay(5000);//waitting for reply, important! the time is base on the condition of internet gprsSerial.printIn: ShowSerialDataQ); gprsSerial printn("AT+CIPSHUT");//close the connection delay(100); ShowSerialData(): flag = 0; } else{ digitalWrite(9, LOW); if (flag == 0){ flag = 1; gprsSerial.printin("AT+CIPSTART=\"TCP\",\"api.thingspeak.com\",\"80\")y//sta up the connection delay(6000); ShowSerialDataQ); gprsSerial.printin("AT+CIPSEND");//begin send data to remote server delay(4000); ShowSerialData(); String str = "GET https://api.thingspeak.com/update?api_key=ER43PWT91CGHQFO0I&field1 String); Serial printIn(str); gprsSerial.printIn(str),//begin send data to remote server delay(4000); ShowSerialData(); digitalWrite(9, LOW); gprsSerial. printIn((char)26);//sending delay(5000);//waitting for reply, important! the time is base on the condition of internet gprsSerial.printIn(); ShowSerialDataQ); gprsSerial.printn("AT+CIPSHUT");//close the connection delay(100); ShowSerialDataQ); yh void ShowSerialData() { while (gprsSerial.available() != 0) Serial. write(gprsSerial.read()); delay(5000); }void Module_Init{ gprsSerial.printin("AT"); delay(1000); gprsSerial.printin("AT+CPIN?"); delay(1000); gprsSerial.printin("AT+CREG?"); delay(1000); gprsSerial printin("AT+CGATT?"); delay(1000); gprsSerial.printin("AT+CIPSHUT"); delay(1000); gprsSerial.printin("AT+CIPSTATUS"); delay(2000); gprsSerial.printin("AT+CIPMUX=0"), delay(2000); ShowSerialDataQ); gprsSerial.printin("AT+CSTT=\"www\""); delay(1000); ShowSerialDataQ; gprsSerial printin("AT+CIICR"); delay(3000); ShowSerialData(); gprsSerial.printin("AT+CIFSR"); delay(2000); ShowSerialData(); gprsSerial.printin("AT+CIPSPRT=0"); delay(3000); ShowSerialDataQ): } Output: Result: Thus the forest fire detection end node using Raspberry Pi device and sensor was verified successfully completed. Ex.no:5 Develop an application for home intrusion detection web application. Date: Aim: To write a program for develop an application for home intrusion detection web application. Algorithm: Step 1: Start Step 2: Connect the Piezo buzzer to digital pin 10 Step 3: Connect the PIR motion sensor to digital pin 7 as an input Step 4: LED is connected to digital pin 13 Step 5:Tx and Rx of GSM module are connected to pin 9, 10 of Arduino. Step 6: We start, assuming no motion detected Step 7: Create a variable for reading the pin status Step 8: Initialize the library with the numbers of the interface pins Step 9: Declare LED as output and sensor as input Step 10: read input value Step 11: check if the input is HIGH, then turn LED ON Step 12: Put the buzzer ON Step 13: Set LCD cursor position Step 14: Print text to LCD as ‘ MOTION DETECTED’ Step 15: Send 3 SMS to a predefined mobile number set inside the program. Step 16:Stop the alarm when reset switch is pressed. Also reactivate the SMS alert facility upon reset. Step 17: Stop. Program: #include #include LiquidCrystal led(12, 11, 5, 4, 3, 2): SoftwareSerial mySerial(, 10); int sensor=7; //The output of PIR sensor connected to pin 7 int push_switch=6; // push button switch connected to pin 6 int buzzer=8; // buzzer connected at pin 8 int sensor_value; //variable to hold read sensor value int sms_count=0; void setup() { pinMode(sensor,INPUT); // configuring pin 7 as Input pinMode(push_switch,INPUT); // configuring pin 6 as Input pinMode(buzzer,OUTPUT); // configuring pin 8 as OUTPUT mySerial.begin(9600); Ied.begin(16,2); delay(500); led.setCursor(2, 0): #/ Set LCD cursor position (column, row) Ied.print("GSM Security"); // Print text to LCD led.setCursor(5, 1); // Set LCD cursor position (column,row) led. print("System"); // Print text to LCD delay(4000); // wait 4s // Delay to read text led.clear(); // clear LCD display // Clear the display led.setCursor(2, 0): // Set LCD cursor position (column, row) led. print("Developed By"); // Print text to LCD led.setCursor(2, 1); // Set LCD cursor position (column, row) led. print("Suman Ssk Vinit"); // Print text to LCD delay(5000); // Delay to read text led.clear(); // Clear LCD led.setCursor(0, 0); led. print("Processing Data."); delay(3000); Ied.clear(); led.setCursor(3, 0); led.print("Waiting For"); led.setCursor(3, 1); led.print("Motion.... void loop() { Check_Burglar();// subroutine to check sensor status and activation of outputs Check_Reset(); // subroutine to check if alarm reset switch pressed or not } void Check_Burglar() { {sensor_value=digitalRead(sensor); // Reading sensor value from pin 7 if(sensor_value==HIGH) // Checking if PIR sensor sends a HIGH signal to Arduino { digitalWrite(buzzer, HIGH); // Activating the buzzer while(sms_count<3) //Number of SMS Alerts to be sent limited at 3 { SendTextMessage(); // Function to send AT Commands to GSM module } sensor_value=HIGH; Ied.setCursor(0,1); led.print("Intruder Alert! SMS sent"); MW) void Check_Reset() { if(digitalRead(push_switch==HIGH))// Checking if pushbutton was pressed { digitalWrite(buzzer,LOW); // turning OFF the buzzer led.setCursor(0,1); led. print("Alarm OFF!"); sms_count=0; // Reactivating the SMS Alert Facility void SendTextMessage() { mySerial.printin("AT+CMGF=1"); _//To send SMS in Text Mode delay(2000); mySerial. printIn(’AT+CMGS=\"+919544xxxxxx\"\r"); // change to the phone no.to which sms is sent delay(2000); mySerial, printIn("Intruder detected and alarm initiated!");//the content of the message delay(200); mySerial.printIn((char)26);//the stopping character delay(5000); mySerial.printIn("AT+CMGS=\"+919847xxxxxx\"\r"); // change to the phone no.to which sms is sent delay(2000): mySerial.printIn("Intruder detected and alarm initiated! message delay(200); mySerial.printIn((char)26)://the message stopping character delay(5000): sms_count++; } ;//the content of the Output: Result: Thus the home intrusion detection web application was verified successfully completed. Ex.n0:6 Develop an application for smart parking application using mae python and django for web application. Aim: To write a program for develop an application for smart parking application using python and django for web application. Algorithm: Step 1: Import Function and Initializing the variables vehicle number, vehicle type, vehicle name, owner name date, and time to some default value. Step 2: Create a while loop block to display the options in Vehicle Parking Management, we have initialized the bikes, cars, and bicycles as global variables. Step 3: Enter for vehicle number entry. Step 4: Enter the vehicle name. Step 5: Enter the owners name. Step 6: Enter the date and time. Step 7: To remove the entry from the register. Step 8: To display the vehicles present in the parking area. Step 9: Spaces left in the parking area. Step 10: Displaying the parking rate. Step 11: To generate bills for different types of vehicles parked. Program: #Import Time import time Vehicle_Number=[/XXXX-XX-XXXX)] Vehicle_Type=['Bike'] vehicle_Name=|"Intruder'] Owner_Name=['Unknown'] Date=['22-22-3636'] Time=['22:22:22'] bikes=100 cars=250 bicycles=78 def main(): global bikes,cars,bicycles try: while True: print” print("\t\tParking Management System") print” print(" 1. Vehicle Entry") print("2.Remove Entry” ) print("3. View Parked Vehicle ") print("4. View Left Parking Space ") print("5.Amount Details ") print("6.Bill") print("7.Close Programme ") print("+— +") ch=int(input("\tSelect option:")) if ch==1: no=True while no==True: Vno=input("\tEnter vehicle number (XXXX-XX-XXXX) - ").upper() if Vno==": print("#4HHHH¢ Enter Vehicle No. #HHHH##") elif Vno in Vehicle_Number: print("s##HHHHt Vehicle Number Already Exists") elif len(Vno)== no=not True Vehicle_Number.append(Vno) else: print("###### Enter Valid Vehicle Number ######") typee=True while typee==True: Vtype=str(input("\tEnter vehicle type(Bicycle=A/Bike=B/Car=C):" .lower() if Viype print("s##HH## Enter Vehicle Type #H####") Vehicle_Type.append(""Bicycle") bicyeles-=1 typee=not True elif Vtype=="b": Vehicle_Type.append(""Bike") bikes typee=not True elif Vtype=="c" Vehicle_Type.append("Car") cars-=1 typee=not True else: print("####### Please Enter Valid Option ####H##") name=True while name==True: vname=input("\tEnter vehicle name - ") if vname: print("##HH#HH##H#Please Enter Vehicle Name ##H#it###") else: vehicle_Name.append(vname) name=not True o=True while o==True: OName=input("\tEnter owner name if OName= print("##i### Please Enter Owner Name ###H###") else: Owner_Name.append(OName) o=not True d-True while d==True: date=input("'\tEnter Date (DD-MM-YYYY) -") if date=="": print("##HHH#H Enter Date #HHHHHE") elif len(date)!=10: print("###### Enter Valid Date #HHH##") else: Date.append(date) d=not True t=True while (==True: time=input("\tEnter Time (HH:MM:SS) - ") print("##HH#H#Ht Enter Time #HH###") elif len(time)!=8: print("####### Please Enter Valid Date ######") else: Time.append(time) t=not True print("\n. .Record detail ..") while no==True: Vno=input("\tEnter vehicle number to Delete(XXXX-XX-XXXX) -").upper() if Vno==": print("ssHH#" Enter Vehicle No. ######") elif len(Vno)==12: if Vno in Vehicle_Number: i=Vehicle_Number.index(Vno) Vehicle_Number.pop(i) Vehicle_Type.pop(i) vehicle_Name.pop(i) Owner_Name,pop(i) Date, pop(i) Time.pop(i) no=not True elif Vno not in Vehicle_Number: print("####### No Such Entry ###HH") else: print("Error") else: print("###### Enter Valid Vehicle Number #######") elif ch: count=0 print("-—— print(""\t\t\t\tParked Vehicle") print("-—~ print("Vehicle No.\tVehicle Type Vehicle Name\t_ — Owner Name\t Date\t\tTime") for i in range(len(Vehicle_Number)): count+=1 print(Vehicle_Numberfi],"\¢ ",Vehicle_Typefil,"\t " vehicle_Namelii,"\t ",Owner_Name| " Datefi],” ",Timeli]) print("-—- ---- Total Records - ",count,". elif ch= print print("\t\t\t\tSpaces Left For Parking") print("\tSpaces Available for Bicycle - bicycles) print("\tSpaces Available for Bike - " bikes) print("\tSpaces Available for Car - ",cars) print("-—- elif cl print(” print("\t\t\t\tParking Rate") print(” print("*1.Bicycle — Rs20/ Hour") print("*2.Bike _Rs40/ Hour") print("*3,Car Rs60/ Hour") print(” Generating Bill no=True while no==True: Vno=input("\tEnter vehicle number to Delete(XXXX-XX-XXXX) - ").upper() if Vno=="": print("##H#### Enter Vehicle No. ##i#####") elif len(Vno)== if Vno in Vehicle_Number: i=Vehicle_Number.index(Vno) no=not True elif Vno not in Vehicle_Number: print("##H###H# No Such Entry #HH###") else: print("Error") else: print("####44H¢ Enter Valid Vehicle Number ######") print("\tVehicle Check in time - ",Time[i) print("\tVehicle Check in Date - ",Datefi]) print("\tVehicle Type - ",Vehicle_Typeli]) inp=True amt=0 while inp==True: hr=input("\tEnter No. of Hours Vehicle Parked - ").lower() if hr==": print("#HH## Please Enter Hours #######") 0 and Vehicle_Typeli ieyele": inp=not True inp=not True elif int(hr)==0 and Vehicle_Typefi "Car": amt=60 inp=not True elif int(hr)>=1: if Vehicle_Type[i]=="Bicycle”: amt=int(hr)*int(20) inp=not True elif Vehicle_Type[i]=="Bike": amt=int(hr)*int(40) inp=not True elif Vehicle_Type[i]=="Car": amt=int(hr)*int(60) inp=not True print("\t Parking Charge - "Jamt) ac=18/100*int(amt) print("\tAdd. charge 18 % - "ac) print("\tTotal Charge - ",int(amt)+int(ac)) print se Thank you for using our " a=input("\tPress Any Key to Proceed - ") quit except: ‘main() main() Thank you for using our 5 seeebeeeeH(: Bye Bye yhoo”) Output: Aehicte Entry 2.Renave Entry 3.¥iew Parked Venice 4.View Left Parking Space S.Arount Details 6.830 7. Close Programe setect option: i Enter vehicle number: (00-14-1000) + Hh2 ST 5646 Enter venice type(Bicyetesh/sikes8/carse):c Enter vehicle nane - Altos Enter cinernane - Ravi Enter Date (00-MH-1YYY) = 12 69 2017 Enter Tine (itt:88) + 7 12 66 ‘tetee Please Enter Valid Oate fateh Enter Tine (H:mH:S8) + 67 12 60 . oe eon EO al Se. a Ge Result: ‘Thus the smart parking application using python and django for web application was verified successfully completed.

You might also like