EM18 RFID Module to CloudX M633 Using Serial LCD CloudX

  • img
Project Details

 In this tutorial you are going to see how to connect i2c lcd display to CloudX and how to use it with EM18 Rfidmodule.

Before going to start this tutorial you must know a brief about i2c communication .

Each I2C bus consists of two signals: SCL and SDA. SCL is the clock signal, and SDA is the data signal. The clock signal is always generated by the current bus master; some slave devices may force the clock low at times to delay the master sending more data (or to require more time to prepare data before the master attempts to clock it out). This is called “clock stretching” and is described on the protocol page.

 

 

Components Required

  1. 1. I2C 16x2 Lcd
  2. 2. EM-18 module
  3. 3. Red Led
  4. 4. Green Led
  5. 5. CloudX M633
  6. 6. 330ohm resistor(2)
  7. 7. Jumper wires(M-M & F-M)
  8. 8. Usb Cable
  9. 9. SoftCard

 

CIRCUIT

EM18 reader module pinCloudX M633 Pin
5+VCC
GroundGND
SELVCC
TxRx

 

 

I2C 16x2 LCD CloudX M633
GNDGND
VCCVCC
SDASDA
SCLSCK

 

CODE

#include <CloudX\I2C_LCD.h>
#include <CloudX\RFID_EM18.h>



#define GLed pin1     // Green Led
#define RLed pin2    //Red Led


    const char validTag[][13] = {
                 "0200E995FA84",      // Valid CARD
                // "03001BD7B57A"       // Invalid CARD
            };

setup(){
           //setup here
           
            EM18_begin(9600);
            LCDSerial_setting(16, 2, 0x3F); //columnSize, rowSize, I2C serial LCD Address
            LCDSerial_cmd(clear);
            LCDSerial_cmd(backLightOn);
            pinMode(1, OUTPUT);
            pinMode(2, OUTPUT);
            GLed = LOW;
            RLed = LOW;
            LCDSerial_writeText(1, 1, "EM18 SYSTEM... ");
            delayMs(1500);
       

loop(){
           //Program here
                 if(EM18_available())
                     if(EM18_authenticate(validTag, 2)) //Tag-Array, Array-Size
                {
                    LCDSerial_writeText(2, 2, "Access Granted!");
                    GLed = 1;
                    RLed = 0;
                }
        
                else 
                {
                    LCDSerial_writeText(2, 2, "Access Denied!");
                    GLed = 0;
                    RLed = 1;
                }

      }
} 

 

Valid Tag
Invalid Tag

 

Share this with friends