SPRINT 2 BUILDING PHASE - L-Division-2018-2019/repo10 GitHub Wiki

SUB - SYSTEM NAME

CUTTING THE PAPER

FABRICATION PLAN

Motion of blade for cutting the paper. Horizontal motion of the blade using Rack Pinion method.

PROGRAM

#include<LiquidCrystal.h>

LiquidCrystal lcd(2,3,4,5,6,7);

void setup()

{

pinMode(8,INPUT);

pinMode(9,INPUT);

pinMode(10,OUTPUT);

pinMode(11,OUTPUT);

pinMode(12,OUTPUT);

pinMode(13,OUTPUT);

int pieces=0,piece1,count;

lcd.begin(16,2);

while(digitalRead(9)!=0) { lcd.print("Hello World!");

lcd.setCursor(0,1);

lcd.print("Insert the Paper");

}

if(digitalRead(9)==0)

{

lcd.setCursor(0,1);

lcd.print("Paper detected  ");

delay(2000);

lcd.setCursor(0,0);

lcd.print("Select Quantity ");

lcd.setCursor(0,1);

lcd.print("Cut    Pieces ");

for(pieces=0;pieces>=0;pieces++)

{

  lcd.setCursor(4,1);

  lcd.print(pieces);

  if(digitalRead(8)==HIGH)

  {

    piece1=piece;

    break; 

  }

  delay(1500);

}

}

while(digitalRead(9)==0)

{

  digitalWrite(10,HIGH);

  digitalWrite(11,LOW);

  delay(15000);

  for(count=0;count<piece1;count++)

  {

    digitalWrite(12,HIGH);

    digitalWrite(13,LOW);

    delay(8000);    //delay for blade to move from one end to the other

    digitalWrite(12,HIGH);

    digitalWrite(13,HIGH);
    
    delay(2000);

    digitalWrite(12,LOW);

    digitalWrite(13,HIGH);

    delay(8000);

    digitalWrite(12,LOW);

    digitalWrite(13,LOW);

    delay(2000);    //delay for blade to move from one end to the other

  }

}

}

void loop() {

}

BUILT SUB - SYSTEM PHOTO

Fig. 1. Built Sub - system Photo
⚠️ **GitHub.com Fallback** ⚠️