SlideShare a Scribd company logo
1 of 11
Assessment Device
Definition:A device designed totestthe wire accessingskillsof the operator underthe addedstressor
of time.Inside the case isaneightquestiontestpertainingtogeneral EODknowledge.The answersto
each questioncorrespondtoa wire’scolorinside the Ethernetcable. The colororderinwhichthe
operatoranswersinisthe same orderinwhichthe wiresmustbe cut. Once the case is openedanLCD
will indicate the amountof time remaining withastartingtime of eightminutes.
Hardware: ATMega328P (Arduino)
Arming: Plugthe powercable intothe wall andturn the keyswitchto on.
Firing:Time runs out,more than one wire cut out of order,pushingred microswitch,cuttingall wiresat
once,removingEthernetfromthe jack.
Code:
#define VERSION"1.1"
//Library Inclusions
#include <Wire.h>
#include <LCDi2cNHD.h>
#include <inttypes.h>
//Set LCD Address
LCDi2cNHD lcd = LCDi2cNHD(4,20,0x50>>1,0);
uint8_t rows = 4;
uint8_t cols= 20;
//Pin Values
int DI = 1;
int microSwitch = 2;
int AI = 3;
int penalty= 4;
int wireA= 5;
int wireB = 6;
int wireC= 7;
int wireD = 8;
int wireE= 9;
int wireF= 10;
int wireG = 11;
int wireH = 12;
//Variable Values
int TIME = 480;
int skips[8];
int order [8];
int submit[8];
int rate = 1;
int wireVal [9];
int AIstate = LOW;
int honest= 0;
int errorCount = 0;
const long interval = 1000;
unsignedlongpreviousMillis=0;
unsignedlongspreviousMillis=0;
void setup()
{
pinMode (DI,OUTPUT);
pinMode (microSwitch,INPUT);
pinMode (AI,OUTPUT);
pinMode (penalty,OUTPUT);
pinMode (wireA,INPUT);
pinMode (wireB,INPUT);
pinMode (wireC,INPUT);
pinMode (wireD,INPUT);
pinMode (wireE,INPUT);
pinMode (wireF,INPUT);
pinMode (wireG,INPUT);
pinMode (wireH,INPUT);
//Initialize the LCD
lcd.init();
lcd.clear();
//Reads value from microswitch
while (digitalRead(microSwitch) == 1)
{
delay (1);
}
//Initialize skipvaluesto 0
for (inti = 0; i < 8; i++)
{
skips [i]= 0;
submit [i]= 10;
order [i] = i;
}
delay(1000);
}
void loop()
{
getDigital();
testDigital();
penTest();
//Beepand countdownwithout delay
unsignedlongcurrentMillis= millis();
if(currentMillis- previousMillis>=(interval / rate))
{
previousMillis=currentMillis;
countdown();
if (AIstate == LOW)
{
AIstate = HIGH;
}
else
{
AIstate = LOW;
}
digitalWrite (AI,AIstate);
}
}
//Test penaltyconditions
void penTest()
{
int counter= 0;
//Killsif the microswitch was pressedafter lidopens
if(digitalRead(microSwitch) == 1)
{
kill();
}
//Killsif time runs out
if(TIME == 0)
{
kill();
}
//Sums up all the valuesof the wires
for (inti = 0; i < 8; i++)
{
counter = counter+ wireVal [i];
}
unsignedlongsecondMillis=millis();
if(secondMillis- spreviousMillis>=interval)
{
spreviousMillis=secondMillis;
if (counter== 1)
{
honest= 1;
}
}
//Disarms ifall the wire valessum up to zero
if((counter== 0) && (honest== 1))
{
disarm();
}
//Killsif all wiresare cut at once
if((counter== 0) && (honest== 0))
{
kill();
}
}
//Penalty siren
void kill()
{
digitalWrite (AI,LOW);
lcd.clear();
lcd.setCursor(0,2);
lcd.print("YOU");
lcd.setCursor(1,5);
lcd.print("BETTER");
lcd.setCursor(2,11);
lcd.print("RUN");
lcd.setCursor(3,14);
lcd.print("FAST");
delay(2000);
digitalWrite (penalty,HIGH);
delay(1000);
digitalWrite (penalty,LOW);
delay(1000);
reminder();
}
//Reads and storeswire values
void getDigital()
{
for (inti = 0; i < 8; i++)
{
wireVal [i]= digitalRead(i+5);
}
}
//Determinesifa wire value is cut out of order
void testDigital()
{
int buffer;
int holder;
for (inti = 0; i < 8; i++)
{
if ((wireVal [i]== 0) && skips[i] == 0)
{
skips[i] = 1;
holder= i;
for (intj = 0; j < 8; j++)
{
if(submit[j] > 9)
{
submit [j]= i;
if (submit[j]!= order [j])
{
rate = 10000;
errorCount++;
submit[j] = 10;
buffer= 8 - i;
for (intk = 1; k < buffer;k++)
{
order [holder]= order [holder+1];
holder++;
}
}
break;
}
}
}
}
if(errorCount == 2)
{
kill();
}
}
//Disarm function
void disarm()
{
lcd.clear();
lcd.setCursor(1,0);
lcd.print(" DISARMED");
digitalWrite (AI,LOW);
digitalWrite (penalty,LOW);
delay(500);
digitalWrite (AI,HIGH);
delay(100);
digitalWrite (AI,LOW);
delay(50);
digitalWrite (AI,HIGH);
delay(100);
digitalWrite (AI,LOW);
delay(50);
digitalWrite (AI,HIGH);
delay(100);
digitalWrite (AI,LOW);
digitalWrite (DI,HIGH);
delay(60000);
reminder();
}
//Displays a countdownto the screen
void countdown()
{
int minutes= TIME / 60;
int seconds= TIME % 60;
lcd.setCursor(1,0);
lcd.print(" Time Remaining");
lcd.setCursor(2,8);
lcd.print(minutes);
lcd.print(":");
if(seconds> 9)
{
lcd.print(seconds);
}
else
{
lcd.print("0");
lcd.print(seconds);
}
TIME--;
}
//Reminderto turn off the device and resetthe cable
void reminder()
{
digitalWrite (AI,LOW);
digitalWrite (penalty,LOW);
lcd.clear();
lcd.print("POWEROFFANDRESET");
while (1)
{
digitalWrite (AI,HIGH);
digitalWrite (DI,HIGH);
delay(100);
digitalWrite (DI,LOW);
digitalWrite (AI,LOW);
delay (900);
}
}
Pictures:
Wire Cut Device
Wire Cut Device
Wire Cut Device

More Related Content

What's hot

Arduino obstacle avoidance robot
Arduino obstacle avoidance robotArduino obstacle avoidance robot
Arduino obstacle avoidance robotSteven Radigan
 
Physical prototyping lab5-complex_sensors
Physical prototyping lab5-complex_sensorsPhysical prototyping lab5-complex_sensors
Physical prototyping lab5-complex_sensorsTony Olsson.
 
Physical prototyping lab6-motors
Physical prototyping lab6-motorsPhysical prototyping lab6-motors
Physical prototyping lab6-motorsTony Olsson.
 
Digital Alarm Clock 446 project report
Digital Alarm Clock 446 project reportDigital Alarm Clock 446 project report
Digital Alarm Clock 446 project reportAkash Mhankale
 
Arduino slides
Arduino slidesArduino slides
Arduino slidessdcharle
 
Rotary encoder training material
Rotary encoder training materialRotary encoder training material
Rotary encoder training materialSáng Bùi Quang
 
Arduino Programming for Basic Robotics - University of Moratuwa
Arduino Programming for Basic Robotics - University of MoratuwaArduino Programming for Basic Robotics - University of Moratuwa
Arduino Programming for Basic Robotics - University of MoratuwaAbarajithan Gnaneswaran
 
Physical prototyping lab3-serious_serial
Physical prototyping lab3-serious_serialPhysical prototyping lab3-serious_serial
Physical prototyping lab3-serious_serialTony Olsson.
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalTony Olsson.
 
Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYVishnu
 
HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyle...
HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyle...HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyle...
HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyle...jamieayre
 
Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)Tony Olsson.
 
Weapons grade React by Ken Wheeler
Weapons grade React by Ken Wheeler Weapons grade React by Ken Wheeler
Weapons grade React by Ken Wheeler React London 2017
 
Biratnagar Robotics Club, Nepal
Biratnagar Robotics Club, NepalBiratnagar Robotics Club, Nepal
Biratnagar Robotics Club, NepalSarwar Alam Ansari
 
Reverse engineering presentation - Digital Alarm Clock
Reverse engineering presentation - Digital Alarm ClockReverse engineering presentation - Digital Alarm Clock
Reverse engineering presentation - Digital Alarm ClockDylan Menezes
 
A2: Analog Malicious Hardware
A2: Analog Malicious HardwareA2: Analog Malicious Hardware
A2: Analog Malicious Hardwareyeokm1
 
Color Recognition with Matlab Image Processing and Matlab Interfacing with Ar...
Color Recognition with Matlab Image Processing and Matlab Interfacing with Ar...Color Recognition with Matlab Image Processing and Matlab Interfacing with Ar...
Color Recognition with Matlab Image Processing and Matlab Interfacing with Ar...Sayan Seth
 

What's hot (20)

Arduino obstacle avoidance robot
Arduino obstacle avoidance robotArduino obstacle avoidance robot
Arduino obstacle avoidance robot
 
Physical prototyping lab5-complex_sensors
Physical prototyping lab5-complex_sensorsPhysical prototyping lab5-complex_sensors
Physical prototyping lab5-complex_sensors
 
Lab2ppt
Lab2pptLab2ppt
Lab2ppt
 
Physical prototyping lab6-motors
Physical prototyping lab6-motorsPhysical prototyping lab6-motors
Physical prototyping lab6-motors
 
Digital Alarm Clock 446 project report
Digital Alarm Clock 446 project reportDigital Alarm Clock 446 project report
Digital Alarm Clock 446 project report
 
Arduino slides
Arduino slidesArduino slides
Arduino slides
 
Rotary encoder training material
Rotary encoder training materialRotary encoder training material
Rotary encoder training material
 
Arduino Programming for Basic Robotics - University of Moratuwa
Arduino Programming for Basic Robotics - University of MoratuwaArduino Programming for Basic Robotics - University of Moratuwa
Arduino Programming for Basic Robotics - University of Moratuwa
 
Physical prototyping lab3-serious_serial
Physical prototyping lab3-serious_serialPhysical prototyping lab3-serious_serial
Physical prototyping lab3-serious_serial
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIY
 
HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyle...
HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyle...HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyle...
HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyle...
 
Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)Physical prototyping lab1-input_output (2)
Physical prototyping lab1-input_output (2)
 
Weapons grade React by Ken Wheeler
Weapons grade React by Ken Wheeler Weapons grade React by Ken Wheeler
Weapons grade React by Ken Wheeler
 
Biratnagar Robotics Club, Nepal
Biratnagar Robotics Club, NepalBiratnagar Robotics Club, Nepal
Biratnagar Robotics Club, Nepal
 
Reverse engineering presentation - Digital Alarm Clock
Reverse engineering presentation - Digital Alarm ClockReverse engineering presentation - Digital Alarm Clock
Reverse engineering presentation - Digital Alarm Clock
 
A2: Analog Malicious Hardware
A2: Analog Malicious HardwareA2: Analog Malicious Hardware
A2: Analog Malicious Hardware
 
Qt arduino serial_port
Qt arduino serial_portQt arduino serial_port
Qt arduino serial_port
 
Sensors and Peripherals
Sensors and PeripheralsSensors and Peripherals
Sensors and Peripherals
 
Color Recognition with Matlab Image Processing and Matlab Interfacing with Ar...
Color Recognition with Matlab Image Processing and Matlab Interfacing with Ar...Color Recognition with Matlab Image Processing and Matlab Interfacing with Ar...
Color Recognition with Matlab Image Processing and Matlab Interfacing with Ar...
 

Viewers also liked

Viewers also liked (15)

Prakarya
PrakaryaPrakarya
Prakarya
 
Hot Employers Cool Technology - High Growth Markets & Visionary Leadership
Hot Employers   Cool Technology - High Growth Markets & Visionary LeadershipHot Employers   Cool Technology - High Growth Markets & Visionary Leadership
Hot Employers Cool Technology - High Growth Markets & Visionary Leadership
 
Full Sail Diploma
Full Sail DiplomaFull Sail Diploma
Full Sail Diploma
 
Europe
EuropeEurope
Europe
 
Ukuran foto
Ukuran fotoUkuran foto
Ukuran foto
 
Agenda semanal sede a del 15 al 19 de septiembre
Agenda semanal sede a del 15 al 19  de septiembreAgenda semanal sede a del 15 al 19  de septiembre
Agenda semanal sede a del 15 al 19 de septiembre
 
CDACAN copy
CDACAN copyCDACAN copy
CDACAN copy
 
Herbal Sex Medicine for Male
Herbal Sex Medicine for MaleHerbal Sex Medicine for Male
Herbal Sex Medicine for Male
 
3667 course book 2011
3667 course book 20113667 course book 2011
3667 course book 2011
 
Story board
Story boardStory board
Story board
 
Marbral advisory Digital Survey Results 2016
Marbral advisory   Digital Survey Results 2016Marbral advisory   Digital Survey Results 2016
Marbral advisory Digital Survey Results 2016
 
Development, Confusion and Exploration of Honeypot Technology
Development, Confusion and Exploration of Honeypot TechnologyDevelopment, Confusion and Exploration of Honeypot Technology
Development, Confusion and Exploration of Honeypot Technology
 
Vendajes
VendajesVendajes
Vendajes
 
Michelle Lawrence Sappe Resume.1
Michelle Lawrence Sappe Resume.1Michelle Lawrence Sappe Resume.1
Michelle Lawrence Sappe Resume.1
 
Digital Readiness
Digital ReadinessDigital Readiness
Digital Readiness
 

Similar to Wire Cut Device

selected input/output - sensors and actuators
selected input/output - sensors and actuatorsselected input/output - sensors and actuators
selected input/output - sensors and actuatorsEueung Mulyana
 
Embedded systems design @ defcon 2015
Embedded systems design @ defcon 2015Embedded systems design @ defcon 2015
Embedded systems design @ defcon 2015Rodrigo Almeida
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalTony Olsson.
 
m.tech esd lab manual for record
m.tech esd lab manual for recordm.tech esd lab manual for record
m.tech esd lab manual for recordG Lemuel George
 
Automatic room light controller with visible counter
Automatic room light controller with visible counterAutomatic room light controller with visible counter
Automatic room light controller with visible counterMafaz Ahmed
 
Best-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiBest-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiUnmesh Baile
 
SMART LAMP WITH A GSM MODULE SIM 800 L
SMART LAMP WITH A GSM MODULE SIM 800 LSMART LAMP WITH A GSM MODULE SIM 800 L
SMART LAMP WITH A GSM MODULE SIM 800 LArisa trirahayu
 
SMART LAMP WITH A GSM MODULE SIM 800L
SMART LAMP WITH A GSM MODULE SIM 800LSMART LAMP WITH A GSM MODULE SIM 800L
SMART LAMP WITH A GSM MODULE SIM 800LArisaTR
 
Smart lamp with gsm modul sim800 l
Smart lamp with gsm modul sim800 lSmart lamp with gsm modul sim800 l
Smart lamp with gsm modul sim800 lrikkjo29
 
Smart Lamp With a GSM Module SIM800L
Smart Lamp With a GSM Module SIM800LSmart Lamp With a GSM Module SIM800L
Smart Lamp With a GSM Module SIM800Lfarid_giffari
 
Data Acquisition
Data AcquisitionData Acquisition
Data Acquisitionazhar557
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and RoboticsNIT Raipur
 
Fingerprint base security system
Fingerprint base security systemFingerprint base security system
Fingerprint base security systempraful borad
 
Using ARM Dev.Board in physical experimental instruments
Using ARM Dev.Board in physical experimental instrumentsUsing ARM Dev.Board in physical experimental instruments
Using ARM Dev.Board in physical experimental instrumentsa_n0v
 

Similar to Wire Cut Device (20)

selected input/output - sensors and actuators
selected input/output - sensors and actuatorsselected input/output - sensors and actuators
selected input/output - sensors and actuators
 
Embedded systems design @ defcon 2015
Embedded systems design @ defcon 2015Embedded systems design @ defcon 2015
Embedded systems design @ defcon 2015
 
Reporte vhdl9
Reporte vhdl9Reporte vhdl9
Reporte vhdl9
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
Arduino tutorial A to Z
Arduino tutorial A to ZArduino tutorial A to Z
Arduino tutorial A to Z
 
m.tech esd lab manual for record
m.tech esd lab manual for recordm.tech esd lab manual for record
m.tech esd lab manual for record
 
Automatic room light controller with visible counter
Automatic room light controller with visible counterAutomatic room light controller with visible counter
Automatic room light controller with visible counter
 
Best-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiBest-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbai
 
SMART LAMP WITH A GSM MODULE SIM 800 L
SMART LAMP WITH A GSM MODULE SIM 800 LSMART LAMP WITH A GSM MODULE SIM 800 L
SMART LAMP WITH A GSM MODULE SIM 800 L
 
SMART LAMP WITH A GSM MODULE SIM 800L
SMART LAMP WITH A GSM MODULE SIM 800LSMART LAMP WITH A GSM MODULE SIM 800L
SMART LAMP WITH A GSM MODULE SIM 800L
 
Smart lamp with gsm modul sim800 l
Smart lamp with gsm modul sim800 lSmart lamp with gsm modul sim800 l
Smart lamp with gsm modul sim800 l
 
Smart Lamp With a GSM Module SIM800L
Smart Lamp With a GSM Module SIM800LSmart Lamp With a GSM Module SIM800L
Smart Lamp With a GSM Module SIM800L
 
Data Acquisition
Data AcquisitionData Acquisition
Data Acquisition
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and Robotics
 
Rig nitc [autosaved] (copy)
Rig nitc [autosaved] (copy)Rig nitc [autosaved] (copy)
Rig nitc [autosaved] (copy)
 
Spark
SparkSpark
Spark
 
Fpga creating counter with internal clock
Fpga   creating counter with internal clockFpga   creating counter with internal clock
Fpga creating counter with internal clock
 
Fingerprint base security system
Fingerprint base security systemFingerprint base security system
Fingerprint base security system
 
Using ARM Dev.Board in physical experimental instruments
Using ARM Dev.Board in physical experimental instrumentsUsing ARM Dev.Board in physical experimental instruments
Using ARM Dev.Board in physical experimental instruments
 
Arduino
ArduinoArduino
Arduino
 

Wire Cut Device

  • 1. Assessment Device Definition:A device designed totestthe wire accessingskillsof the operator underthe addedstressor of time.Inside the case isaneightquestiontestpertainingtogeneral EODknowledge.The answersto each questioncorrespondtoa wire’scolorinside the Ethernetcable. The colororderinwhichthe operatoranswersinisthe same orderinwhichthe wiresmustbe cut. Once the case is openedanLCD will indicate the amountof time remaining withastartingtime of eightminutes. Hardware: ATMega328P (Arduino) Arming: Plugthe powercable intothe wall andturn the keyswitchto on. Firing:Time runs out,more than one wire cut out of order,pushingred microswitch,cuttingall wiresat once,removingEthernetfromthe jack. Code: #define VERSION"1.1" //Library Inclusions #include <Wire.h> #include <LCDi2cNHD.h> #include <inttypes.h> //Set LCD Address LCDi2cNHD lcd = LCDi2cNHD(4,20,0x50>>1,0); uint8_t rows = 4; uint8_t cols= 20; //Pin Values int DI = 1; int microSwitch = 2; int AI = 3; int penalty= 4; int wireA= 5; int wireB = 6; int wireC= 7; int wireD = 8; int wireE= 9; int wireF= 10; int wireG = 11; int wireH = 12; //Variable Values int TIME = 480; int skips[8]; int order [8];
  • 2. int submit[8]; int rate = 1; int wireVal [9]; int AIstate = LOW; int honest= 0; int errorCount = 0; const long interval = 1000; unsignedlongpreviousMillis=0; unsignedlongspreviousMillis=0; void setup() { pinMode (DI,OUTPUT); pinMode (microSwitch,INPUT); pinMode (AI,OUTPUT); pinMode (penalty,OUTPUT); pinMode (wireA,INPUT); pinMode (wireB,INPUT); pinMode (wireC,INPUT); pinMode (wireD,INPUT); pinMode (wireE,INPUT); pinMode (wireF,INPUT); pinMode (wireG,INPUT); pinMode (wireH,INPUT); //Initialize the LCD lcd.init(); lcd.clear(); //Reads value from microswitch while (digitalRead(microSwitch) == 1) { delay (1); } //Initialize skipvaluesto 0 for (inti = 0; i < 8; i++) { skips [i]= 0; submit [i]= 10; order [i] = i; } delay(1000); }
  • 3. void loop() { getDigital(); testDigital(); penTest(); //Beepand countdownwithout delay unsignedlongcurrentMillis= millis(); if(currentMillis- previousMillis>=(interval / rate)) { previousMillis=currentMillis; countdown(); if (AIstate == LOW) { AIstate = HIGH; } else { AIstate = LOW; } digitalWrite (AI,AIstate); } } //Test penaltyconditions void penTest() { int counter= 0; //Killsif the microswitch was pressedafter lidopens if(digitalRead(microSwitch) == 1) { kill(); } //Killsif time runs out if(TIME == 0) { kill(); } //Sums up all the valuesof the wires for (inti = 0; i < 8; i++) {
  • 4. counter = counter+ wireVal [i]; } unsignedlongsecondMillis=millis(); if(secondMillis- spreviousMillis>=interval) { spreviousMillis=secondMillis; if (counter== 1) { honest= 1; } } //Disarms ifall the wire valessum up to zero if((counter== 0) && (honest== 1)) { disarm(); } //Killsif all wiresare cut at once if((counter== 0) && (honest== 0)) { kill(); } } //Penalty siren void kill() { digitalWrite (AI,LOW); lcd.clear(); lcd.setCursor(0,2); lcd.print("YOU"); lcd.setCursor(1,5); lcd.print("BETTER"); lcd.setCursor(2,11); lcd.print("RUN"); lcd.setCursor(3,14); lcd.print("FAST"); delay(2000); digitalWrite (penalty,HIGH); delay(1000); digitalWrite (penalty,LOW); delay(1000);
  • 5. reminder(); } //Reads and storeswire values void getDigital() { for (inti = 0; i < 8; i++) { wireVal [i]= digitalRead(i+5); } } //Determinesifa wire value is cut out of order void testDigital() { int buffer; int holder; for (inti = 0; i < 8; i++) { if ((wireVal [i]== 0) && skips[i] == 0) { skips[i] = 1; holder= i; for (intj = 0; j < 8; j++) { if(submit[j] > 9) { submit [j]= i; if (submit[j]!= order [j]) { rate = 10000; errorCount++; submit[j] = 10; buffer= 8 - i; for (intk = 1; k < buffer;k++) { order [holder]= order [holder+1]; holder++; } } break; } } } }
  • 6. if(errorCount == 2) { kill(); } } //Disarm function void disarm() { lcd.clear(); lcd.setCursor(1,0); lcd.print(" DISARMED"); digitalWrite (AI,LOW); digitalWrite (penalty,LOW); delay(500); digitalWrite (AI,HIGH); delay(100); digitalWrite (AI,LOW); delay(50); digitalWrite (AI,HIGH); delay(100); digitalWrite (AI,LOW); delay(50); digitalWrite (AI,HIGH); delay(100); digitalWrite (AI,LOW); digitalWrite (DI,HIGH); delay(60000); reminder(); } //Displays a countdownto the screen void countdown() { int minutes= TIME / 60; int seconds= TIME % 60; lcd.setCursor(1,0); lcd.print(" Time Remaining"); lcd.setCursor(2,8); lcd.print(minutes); lcd.print(":"); if(seconds> 9) { lcd.print(seconds); } else
  • 7. { lcd.print("0"); lcd.print(seconds); } TIME--; } //Reminderto turn off the device and resetthe cable void reminder() { digitalWrite (AI,LOW); digitalWrite (penalty,LOW); lcd.clear(); lcd.print("POWEROFFANDRESET"); while (1) { digitalWrite (AI,HIGH); digitalWrite (DI,HIGH); delay(100); digitalWrite (DI,LOW); digitalWrite (AI,LOW); delay (900); } }