SOFTWARE DESIGN
Arduino :
A program for Arduino hardware may be written in any programming language with compilers that produce binary machine code for the target processor. Atmel provides a development environment for their 8-bit AVR and 32-bit ARM Cortex-M based microcontrollers AVR Studio (older) and Atmel Studio (newer).
IDE : The Arduino integrated development environment (IDE) is a cross-platform application (for Windows, macOS, and Linux) that is written in the Java programming language. It originated from the IDE for the languages Processing and Wiring. It includes a code editor with features such as text cutting and pasting, searching and replacing text, automatic indenting, brace matching, and syntax highlighting, and provides simple one-click mechanisms to compile and upload programs to an Arduino board. It also contains a message area, a text console, a toolbar with buttons for common functions and a hierarchy of operation menus. The source code for the IDE is released under the GNU General Public License, version 2.
The Arduino IDE supports the languages C and C++ using special rules of code structuring. The Arduino IDE supplies a software library from the Wiring project, which provides many common input and output procedures. User-written code only requires two basic functions, for starting the sketch and the main program loop, that are compiled and linked with a program stub main() into an executable cyclic executive program with the GNU toolchain, also included with the IDE distribution. The Arduino IDE employs the program avrdude to convert the executable code into a text file in hexadecimal encoding that is loaded into the Arduino board by a loader program in the board's firmware.
IDE 2.0 : On October 18, 2019, Arduino Pro IDE (alpha preview) was released. Later, on March 1, 2021, the beta preview was released, renamed IDE 2.0. The system still uses Arduino CLI (Command Line Interface), but improvements include a more professional development environment, auto completion support, and Git integration. The application frontend is based on the Eclipse Theia Open Source IDE.
The main features available in the new release are:
Modern, fully featured development environment
Dual Mode, Classic Mode and Pro Mode (File System view)
New Board Manager
New Library Manager
Board List
Basic Auto-Completion (Arm targets only)
Git Integration
Serial Monitor
Dark Mode
Firmware & Certificate Uploader
Serial Monitor
Arduino Sketchbook
PLX-DAQ:
Parallax Data Acquisition tool (PLX-DAQ) software add-in for Microsoft Excel acquires up to 26 channels of data from any Parallax microcontrollers and drops the numbers into columns as they arrive. PLX-DAQ provides easy spreadsheet analysis of data collected in the field, laboratory analysis of sensors and real-time equipment monitoring. PLX-DAQ is a Parallax microcontroller data acquisition add-on tool for Microsoft Excel. Any of our microcontrollers connected to any sensor and the serial port of a PC can now send data directly into Excel.
PLX-DAQ has the following features:
Plot or graph data as it arrives in real-time using Microsoft Excel
Record up to 26 columns of data
Mark data with real-time (hh:mm:ss) or seconds since reset
Read/Write any cell on a worksheet
Read/Set any of 4 checkboxes on control the interface
Example code for the BS2, SX (SX/B) and Propeller available
Baud rates up to 128K
Supports Com1-15
SOURCE CODE :
#include <SPI.h>
#include <MFRC522.h>
#include <LiquidCrystal.h> // include the library code:
const int rs = 3, en = 2, d4 = 5, d5 = 6, d6 = 7, d7 = 8;
LiquidCrystallcd(rs, en, d4, d5, d6, d7);
#define SS_PIN 10 // RX slave select
#define RST_PIN 9
MFRC522 mfrc522(SS_PIN, RST_PIN); // create MFRC522 instance.
byte card_ID[4]; // card UID
byte Name1[4]={0x76,0x80,0x78,0xF8};
byte Name2[4]={0x6B,0xD5,0x3A,0x0C};
byte Name3[4]={0x2C,0x8B,0X10,0X23};
byte Name4[4]={0xDA,0xAF,0xAE,0x80};
int NumbCard[5]; // the number of cards. in my case I have 6 cards.
int j=0; // increased by one for every user you add
int statu[5]; // the number of cards.
int s=0; // increased by one for every user you add
int const RedLed=4;
String Log;
String Name; // user name
String Roll_Number; // user number
String Branch;
String Semester;
String Section;
long Card_ID;
int n ; // the number of card you want to detect (optional)
int ID=1;
void setup()
{
lcd.begin(16, 2);
Serial.begin(9600); // initialize serial communications with the PC
SPI.begin(); // initialize SPI bus
mfrc522.PCD_Init(); // initialize MFRC522 card
Serial.println("CLEARSHEET"); // clears starting at row 1
Serial.println("LABEL,Date,Name,Roll_Number,Branch,Semester,Section,Time IN,Time
OUT");
pinMode(RedLed,OUTPUT);
lcd.setCursor(2,0);
lcd.print("Welcome");
delay(700);
lcd.clear();
lcd.setCursor(2,0);
lcd.print("Please bring");
lcd.setCursor(2,1);
lcd.print("your Tag near"); // welcome Message will appear in the beginning.
delay(500);
}
void loop()
{
cont1:
if ( ! mfrc522.PICC_IsNewCardPresent())
{
Return; // got to start of loop if there is no card present
}
if ( ! mfrc522.PICC_ReadCardSerial())
{
return;
}
for (byte i = 0; i< mfrc522.uid.size; i++)
{
card_ID[i]= mfrc522.uid.uidByte[i];
if(card_ID[i]==Name1[i])
{
Name="Hemant Katta"; // user name
Roll_Number="19R11A0467"; // user number
Card_ID=118128120248;
Semester="V-I";
Branch= "ECE";
Section="A";
j=0; // increased by one for every user you add
s=0; // ++1
}
else if(card_ID[i]==Name2[i])
{
Name="Naithika"; // user name
Roll_Number="19R11A0473"; // user number
Card_ID=1072135812;
Branch= "CSE";
Semester="III-I";
Section="B";
j=1; //++1
s=1; //++1
}
else if(card_ID[i]==Name3[i]){
Name="Kusuma"; // user name
Roll_Number="19R11A0465"; // user number
Card_ID=441391635;
Branch= "CIVIL";
Semester="I-I";
Section="C";
j=2; // ++1
s=2; // ++1
}
else if(card_ID[i]==Name4[i])
{
Name="Akhila"; // user name
Roll_Number="19R11A0477"; // user number
Card_ID=218175174128;
Semester="II-I";
Branch= "IT";
Section="D";
j=3; // ++1
s=3; // ++1
}
/*else if(card_ID[i]==Name5[i])
{
Name="Sruthi"; // user name
Number=480; // user number
Card_ID=480;
Branch= "MECH";
j=4; // ++1
s=4; // ++1
}*/
else{
digitalWrite(RedLed,HIGH);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("unidentified ");
lcd.setCursor(4,1);
lcd.print("Try again. .. ");
delay(1000);
gotocont; // go directly to line 188
}
}
if(NumbCard[j] == 1 &&statu[s] == 0)
{
statu[s]=1;
NumbCard[j] = 0;
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Student Out"); // printed in line 2
lcd.setCursor(4,1);
lcd.print(Name); // printed in line 2
Serial.print("DATA,"); // send the Name to excel
Serial.print("DATE");
Serial.print(",");
Serial.print(Name);
Serial.print(",");
Serial.print(Roll_Number); // send the Number to excel
Serial.print(",");
//Serial.print(card_ID); // send the card ID to excel
Serial.print(Branch); // send the Number to excel
Serial.print(",");
Serial.print(Semester); // send the Number to excel
Serial.print(",");
Serial.print(Section); // send the Number to excel
Serial.print(",");
Serial.print("");
Serial.print(",");
Serial.println("TIME");
ID=ID+1;
digitalWrite(RedLed,LOW);
}
else if(NumbCard[j] == 0)
{
NumbCard[j] = 1;
statu[s]=0;
n++; // (optional)
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Student In");
lcd.setCursor(4,1);
lcd.print(Name);
Serial.print("DATA,"); // send the Name to excel
Serial.print("DATE");
Serial.print(",");
Serial.print(Name);
Serial.print(",");
Serial.print(Roll_Number); // send the Number to excel
Serial.print(",");
//Serial.print(card_ID); // send the card ID to excel
Serial.print(Branch); // send the Number to excel
Serial.print(",");
Serial.print(Semester); // send the Number to excel
Serial.print(",");
Serial.print(Section); // send the Number to excel
Serial.print(",");
Serial.print("TIME");
Serial.print(",");
Serial.println("");
digitalWrite(RedLed,LOW);
ID=ID+1;
}
/* else if(statu[s] == 1)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print(Name);
lcd.setCursor(0,1);
lcd.print("Already Left");
}*/
delay(1000);
lcd.clear();
lcd.setCursor(2,0);
lcd.print("Please bring");
lcd.setCursor(2,1);
lcd.print("your Tag near");
cont:
digitalWrite(RedLed,LOW);
card_ID[4];
delay(500);
lcd.clear();
lcd.setCursor(2,0);
lcd.print("Please bring");
lcd.setCursor(2,1);
lcd.print("your Tag near");
goto cont1;
}