Skip to content

RFID and IoT Based Smart Security System using esp8266, mfrc522 and Google Spreadsheet. Logs RFID Smart card data into google spreadsheed dynamically with date and time making attendance less time consuming and efficient

Notifications You must be signed in to change notification settings

atharvakaplay123/Smart-Attendance-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RFID + IoT Attendence System

Configuring Google SpreadSheet-Apps Script

Step 1: Create a Blank Google SpreadSheet and go to

Extentions > Apps Script

Step 2: Copy the below code and paste it there

function doGet(e) { 
  Logger.log( JSON.stringify(e) );
  var result = 'Ok';
  if (e.parameter == 'undefined') {
    result = 'No Parameters';
  }
  else {
    var sheet_id = ''; 	// Spreadsheet ID
    var sheet = SpreadsheetApp.openById(sheet_id).getActiveSheet();
    var newRow = sheet.getLastRow() + 1;						
    var rowData = [];

    var Curr_Date = new Date();
    rowData[0] = Curr_Date; // Date in column A

    var Curr_Time = Utilities.formatDate(Curr_Date, "Asia/Kolkata", 'HH:mm:ss');
    rowData[1] = Curr_Time; // Time in column B

    for (var param in e.parameter) {
      Logger.log('In for loop, param=' + param);
      var value = stripQuotes(e.parameter[param]);
      Logger.log(param + ':' + e.parameter[param]);
      switch (param) {
        case 'name':
          rowData[2] = value; // Employee Name in column C
          result = 'Employee Name Written on column C'; 
          break;
        default:
          result = "unsupported parameter";
      }
    }
    Logger.log(JSON.stringify(rowData));
    var newRange = sheet.getRange(newRow, 1, 1, rowData.length);
    newRange.setValues([rowData]);
  }
  return ContentService.createTextOutput(result);
}
function stripQuotes( value ) {
  return value.replace(/^["']|['"]$/g, "");
}

Step 3: Copy the SpreadSheet ID which you can find in spreadsheet url and paste it to the code

Step 4: Hit the 'Deploy' Button select 'Web App' and allow access to anyone

Step 5: Copy the link and deploy it(later paste that link in arduine code)

Step 6: Rename the Project as you want and hit the save button

About

RFID and IoT Based Smart Security System using esp8266, mfrc522 and Google Spreadsheet. Logs RFID Smart card data into google spreadsheed dynamically with date and time making attendance less time consuming and efficient

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages