Created
October 17, 2019 09:59
-
-
Save dsvakola/6556957133ff86f6f1f230524456664e to your computer and use it in GitHub Desktop.
This is a working model to sort variety of coins with different shapes and sizes. The coins are passed through a narrow channel, with different size holes in it. Below the trey of collection of different coins, a vibrator is used which gives thrust to the pile of coins and they pass through the narrow channel and fall into different collector bo…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Project of Coin Sorter & Counting Machine | |
* Designed by: Kaushik Joshi, Tanish Patil, | |
* Om Sonone, Shreyas Patil and Sarthak Kharote | |
* Guided by: Prof. Dattaraj Vidyasagar | |
* Website: www.vsagar.org | |
* Starting Date: 18.09.2019 | |
* Program Compilation Date: 04.10.2019 | |
* Finalisation Date: | |
*/ | |
#include <LiquidCrystal.h> // header file for LCD display | |
const int rs=2,en=3,d4=4,d5=5,d6=6,d7=7; | |
LiquidCrystal lcd(rs,en,d4,d5,d6,d7); | |
int coin5=0; // variable to count the number of Rs.5 coins | |
int coin10=0; // variable to count the number of Rs.10 coins | |
int IRS5=8; // IR Sensor5 is attached to pin-8 | |
int IRS10=9; // IR Sensor10 is attached to pin-9 | |
void setup() | |
{ | |
pinMode(IRS5,INPUT); // pin-8 is declared as input pin | |
pinMode(IRS10,INPUT); // pin-9 is declared as input pin | |
lcd.begin(16,2); // the LCD display is initiated | |
lcd.clear(); // clears previous message on the display | |
lcd.setCursor(0,0); // first row selected | |
lcd.print("Coin Sorter"); | |
lcd.setCursor(0,1); // second row selected | |
lcd.print("Counter Machine"); | |
delay(3000); | |
lcd.clear(); // clears previous message on the display | |
lcd.setCursor(0,0); // first row selected | |
lcd.print("Bal Shivaji"); | |
lcd.setCursor(0,1); // first row selected | |
lcd.print("HighSchool Akola"); | |
delay(3000); | |
lcd.clear(); // clears previous message on the display | |
} | |
void loop() | |
{ | |
if(!digitalRead(IRS5) && !digitalRead(IRS10)) | |
{ | |
coin5++; | |
coin10++; | |
lcd.clear(); | |
lcd.setCursor(0,0); | |
lcd.print("Rs.5 Coins:"); | |
lcd.print(coin5); | |
lcd.setCursor(0,1); | |
lcd.print("Rs.10 Coins:"); | |
lcd.print(coin10); | |
delay(250); | |
} | |
if(!digitalRead(IRS5) && digitalRead(IRS10)) | |
{ | |
coin5++; | |
lcd.clear(); | |
lcd.setCursor(0,0); | |
lcd.print("Rs.5 Coins:"); | |
lcd.print(coin5); | |
delay(250); | |
} | |
if(digitalRead(IRS5) && !digitalRead(IRS10)) | |
{ | |
coin10++; | |
lcd.clear(); | |
lcd.setCursor(0,1); | |
lcd.print("Rs.10 Coins:"); | |
lcd.print(coin10); | |
delay(250); | |
} | |
if(digitalRead(IRS5) && digitalRead(IRS10)) | |
{ | |
lcd.setCursor(0,0); | |
lcd.print("Rs.5 Coins:"); | |
lcd.print(coin5); | |
lcd.setCursor(0,1); | |
lcd.print("Rs.10 Coins:"); | |
lcd.print(coin10); | |
delay(1000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Finalised on 17.10.2019