Boo Yi Hengno nosham_221299dMikael Lim
Published © GPL3+

Smart Entry System for Factory

A factory related project makes checking in and out of work more efficient and less congested.

BeginnerShowcase (no instructions)5 hours216
Smart Entry System for Factory

Things used in this project

Hardware components

Mini RFID Unit RC522 Module Sensor
M5Stack Mini RFID Unit RC522 Module Sensor
×1
ESP32 Basic Core IoT Development Kit
M5Stack ESP32 Basic Core IoT Development Kit
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×1

Software apps and online services

UIFlow

Story

Read more

Schematics

Block Diagram

Block Diagram

Flowchart

Flowchart

Circuit

Circuit

Code

Smart Factory

Python
Smart factory python codes
from m5stack import *
from m5ui import *
from uiflow import *
import time
import unit

setScreenColor(0x222222)
rfid_0 = unit.get(unit.RFID, unit.PORTA)
servo_0 = unit.get(unit.SERVO, unit.PORTB)


i = None
x = None



label0 = M5TextBox(90, 140, "Text", lcd.FONT_DejaVu18, 0xFFFFFF, rotate=0)
label1 = M5TextBox(48, 55, "Text", lcd.FONT_DejaVu18, 0xFFFFFF, rotate=0)




while True:
  if rfid_0.isCardOn():
    for i in ['d2bae91190', 'f2d5c10b3', '827e4312ad']:
      if (rfid_0.readUid()) == i:
        x = True
        break
      if (rfid_0.readUid()) != i:
        x = False
    if x == True:
      label0.setText('Access Granted')
      label1.setText(str(rfid_0.readUid()))
      speaker.tone(2200, 200)
      rgb.setColorAll(0x33cc00)
      wait(1)
      servo_0.write_angle(100)
      wait(3)
      servo_0.write_angle(0)
    if x == False:
      label0.setText('Access Denied')
      label1.setText(str(rfid_0.readUid()))
      speaker.tone(1600, 400)
      rgb.setColorAll(0xcc0000)
      wait(1)
  else:
    label0.setText('Scan your card')
    label1.setText('Welcome to the factory')
    rgb.setColorAll(0x000000)
  wait_ms(2)

Credits

Boo Yi Heng
1 project • 1 follower
Contact
no no
1 project • 1 follower
Contact
sham_221299d
0 projects • 1 follower
Contact
Mikael Lim
0 projects • 0 followers
Contact

Comments

Please log in or sign up to comment.