LPG gas leak alarm
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
Shop by category
Shop all componentsShow a person's full details on screen when their tag is scanned, cycling through more information than fits on one page. A UID lookup table maps a meaningless string of hex bytes to a person. The tag itself stores no personal data at all, it only carries an identifier, and everything else lives in the system. That is a deliberate design choice with a real privacy benefit: losing the card reveals nothing. Because the profile is longer than the screen, the details are split into pages that the button steps through.
The ESP32 is a 3.3V board: never connect a 5V signal straight to a GPIO pin.
Power the RC522 from 3V3 only. 5V on its VCC pin destroys it.
Every part for this build comes in the Geekobot Titan Kit box, a Geekobot exclusive, together with the parts for all 120 projects, from a first blinking LED to a smart fan and a reaction game. The wiring below is the kit's own wiring.
Tick anything you already have and the total updates.
ESP32 DevKit V1 (38-pin): the brain of every Titan Kit project, with Wi-Fi and Bluetooth
Male-to-female and female-to-female leads for the modules
RC522 RFID reader with cards and a key fob (3.3V board)
ESP32 expansion board from the kit: every GPIO has its own S, V, G header
Follow the colours: red is power, dark grey is ground, blue is a signal.
titan_kit_073_rfid_personal_profile_view.inoVerify & upload in Electrolark#include <SPI.h>
#include <MFRC522.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SS_PIN 5
#define RST_PIN 32
#define PEOPLE 3
MFRC522 rfid(SS_PIN, RST_PIN);
Adafruit_SSD1306 display(128, 64, &Wire, -1);
int pageButton = 12;
String personUID[PEOPLE] = {"A1 B2 C3 D4", "11 22 33 44", "AA BB CC DD"};
String name_[PEOPLE] = {"ANJALI R", "RAHUL K", "PRIYA S"};
String role[PEOPLE] = {"Class 10-A", "Class 10-B", "Class 9-C"};
String idNumber[PEOPLE] = {"STU-1042", "STU-1043", "STU-0987"};
String house[PEOPLE] = {"Blue House", "Red House", "Green House"};
String contact[PEOPLE] = {"Ext 210", "Ext 214", "Ext 118"};
int current = -1;
int page = 0;
unsigned long shownAt = 0;
String readUID()
{
String uid = "";
for (byte i = 0; i < rfid.uid.size; i++)
{
if (rfid.uid.uidByte[i] < 0x10) uid = uid + "0";
uid = uid + String(rfid.uid.uidByte[i], HEX);
if (i < rfid.uid.size - 1) uid = uid + " ";
}
uid.toUpperCase();
return uid;
}
int findPerson(String uid)
{
for (int i = 0; i < PEOPLE; i++)
{
if (personUID[i] == uid) return i;
}
return -1;
}
void showIdle()
{
display.clearDisplay();
display.setTextSize(1);
display.setCursor(0, 0);
display.print("PROFILE VIEWER");
display.setTextSize(2);
display.setCursor(0, 20);
display.print("SCAN ID");
display.setTextSize(1);
display.setCursor(0, 48);
display.print("Hold your card to");
display.setCursor(0, 56);
display.print("the reader");
display.display();
}
void showProfile()
{
display.clearDisplay();
display.setTextSize(1);
display.fillRect(0, 0, 128, 12, SSD1306_WHITE);
display.setTextColor(SSD1306_BLACK);
display.setCursor(3, 2);
display.print(name_[current]);
display.setCursor(112, 2);
display.print(page + 1);
display.print("/2");
display.setTextColor(SSD1306_WHITE);
if (page == 0)
{
display.setCursor(0, 18);
display.print("Class:");
display.setCursor(48, 18);
display.print(role[current]);
display.setCursor(0, 30);
display.print("ID no:");
display.setCursor(48, 30);
display.print(idNumber[current]);
display.setCursor(0, 42);
display.print("House:");
display.setCursor(48, 42);
display.print(house[current]);
}
else
{
display.setCursor(0, 18);
display.print("Contact:");
display.setCursor(0, 30);
display.print(contact[current]);
display.setCursor(0, 44);
display.print("Card UID:");
display.setCursor(0, 54);
display.print(personUID[current]);
}
display.display();
}
void setup()
{
pinMode(pageButton, INPUT_PULLUP);
Serial.begin(9600);
SPI.begin();
rfid.PCD_Init();
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { while (true) { } }
display.setTextColor(SSD1306_WHITE);
showIdle();
}
void loop()
{
if (current >= 0)
{
if (digitalRead(pageButton) == LOW)
{
page = (page + 1) % 2;
shownAt = millis();
showProfile();
delay(300);
}
if (millis() - shownAt > 12000)
{
current = -1;
showIdle();
}
}
if (!rfid.PICC_IsNewCardPresent()) return;
if (!rfid.PICC_ReadCardSerial()) return;
String uid = readUID();
int index = findPerson(uid);
if (index < 0)
{
display.clearDisplay();
display.setCursor(0, 0);
display.print("CARD NOT REGISTERED");
display.setCursor(0, 24);
display.print(uid);
display.setCursor(0, 48);
display.print("Add this UID to");
display.setCursor(0, 56);
display.print("the personUID array");
display.display();
Serial.print("Unregistered: ");
Serial.println(uid);
delay(3000);
showIdle();
}
else
{
current = index;
page = 0;
shownAt = millis();
showProfile();
Serial.print("Profile shown: ");
Serial.println(name_[index]);
}
rfid.PICC_HaltA();
rfid.PCD_StopCrypto1();
}
Use a micro-USB data cable (some cables only charge), install the CP210x or CH340 driver if no port appears, pick Tools > Board > ESP32 Dev Module and hold the BOOT button on the board until the upload starts.
The sketch uses INPUT_PULLUP, so one leg goes to the GPIO and the other to GND. Use two legs on opposite sides of the button.
Check SDA on GPIO21 and SCL on GPIO22, power from 3V3, and that the sketch uses address 0x3C (some boards are 0x3D).
The RC522 must run from 3V3, and SDA, SCK, MOSI, MISO and RST must go to the GPIOs in the table. Hold the card flat on the reader.
A UID lookup table maps a meaningless string of hex bytes to a person. The tag itself stores no personal data at all, it only carries an identifier, and everything else lives in the system. That is a deliberate design choice with a real privacy benefit: losing the card reveals nothing. Because the profile is longer than the screen, the details are split into pages that the button steps through.
SCAN ID on the idle screen. Tap a registered card: the name appears in a header bar with class, ID and house below. Press the button for page 2 showing contact details and the card UID.
Yes. It is project 73 of 120 in the Geekobot Titan Kit, in level 12 (RFID systems). Every part on the list comes in the kit box, and you can also buy the parts one by one from the list above.
No. Every Titan Kit project is wired on the ESP32 expansion board and the breadboard with jumper wires.
8 parts: ESP32-WROOM-32 38-Pin Development Board, USB Cable, Solderless Breadboard, Dupont Jumper Wires (40 pcs), Tactile Push Button Switch, 0.96" OLED Display 128x64, RC522 RFID Reader Writer SPI Module with Card & Tag and ESP32 38-Pin Expansion Board. On this page you can tick the parts you already have and add only the rest to your cart.
It is a intermediate project and takes about 45 minutes. The build on this page has 6 steps.
No. This page has the complete, tested code (titan_kit_073_rfid_personal_profile_view.ino).
About ₹885 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
UID lookup tables; Why the tag stores an identifier, not personal data; Paging content that exceeds the screen; Timing out a display for privacy.
The ESP32 is a 3.3V board: never connect a 5V signal straight to a GPIO pin. Power the RC522 from 3V3 only. 5V on its VCC pin destroys it.
A kitchen gas sniffer that beeps and flashes the moment LPG levels climb.
See the smoke level live on a crisp screen and get a loud warning when it spikes.
An infrared eye that spots an open flame and raises the alarm.
Walk into the room and it sounds the alarm: the classic first security build.
Lessons are free to read. Maker (₹499/month) and Pro add quizzes, worked problems and certificates, paid with your Geekobot account. See plans
Learning project. Check every circuit and the datasheet of each part before you power it up.