Skip to content

Instantly share code, notes, and snippets.

@cyrusmeh
cyrusmeh / Build a Handwritten Digit Recognition System with Python.py
Created September 11, 2025 07:01
In this comprehensive deep learning tutorial, we will guide you through the process of building a complete Handwritten Digit Recognition system from scratch using Python! Perfect for beginners, this project is your gateway to the fascinating world of Artificial Intelligence and Convolutional Neural Networks (CNNs).
from keras.models import load_model
from tkinter import *
import tkinter as tk
from win32 import win32gui
from PIL import ImageGrab, Image
import numpy as np
model = load_model('mnist.h5')
def predict_digit(img):
@cyrusmeh
cyrusmeh / FZA1.ino
Created May 21, 2025 01:01
Project related to FZA.
#include <SPI.h>
#include <EtherCard.h>
#include <MFRC522.h>
#include <Keypad.h>
// Network configuration
static byte mymac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
static byte myip[] = {192, 168, 137, 177};
static byte gwip[] = {192, 168, 137, 1};
static byte netmask[] = {255, 255, 255, 0};
@cyrusmeh
cyrusmeh / Connect Arduino Nano to the Internet with W5500 Ethernet Module | Step-by-Step Guide.ino
Created May 16, 2025 19:05
In this comprehensive tutorial, we'll show you how to connect your Arduino Nano to the internet or a local network using the W5500 Ethernet Module.
#include <SPI.h>
#include <Ethernet2.h>
// Network configuration
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192, 168, 137, 100);
IPAddress gateway(192, 168, 137, 1);
IPAddress subnet(255, 255, 255, 0);
EthernetServer server(80); // HTTP port
@cyrusmeh
cyrusmeh / ESP32-CAM License Plate Recognition | AI-Powered LPR System Tutorial.ino
Created April 1, 2025 18:57
In this comprehensive tutorial, we’ll guide you through building a License Plate Recognition System using the ESP32-CAM. You’ll receive step-by-step instructions, complete with a circuit diagram and code, to help you capture images of cars and bikes. We’ll show you how to send these images to a cloud server powered by AI for license plate recogn…
// Libraries for WiFi, Secure Client, and Camera functionalities
#include <Arduino.h>
#include <WiFi.h>
#include <WiFiClientSecure.h>
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
#include "esp_camera.h"
/* I2C and OLED Display Includes ------------------------------------------- */
#include <Wire.h>
@cyrusmeh
cyrusmeh / Control LEDs with Hand Gestures: Mediapipe, OpenCV & Arduino Nano Tutorial code1.ino
Created March 31, 2025 16:50
In this exciting tutorial, you'll learn how to control LED lights using your hand gestures! We’ll combine the power of Mediapipe and OpenCV with Arduino Nano to create a fun and interactive project.
int ledPins[] = {2, 3, 4, 5, 6}; // Thumb, Index, Middle, Ring, Pinky
void setup() {
Serial.begin(9600);
for (int i = 0; i < 5; i++) {
pinMode(ledPins[i], OUTPUT);
}
}
void loop() {
@cyrusmeh
cyrusmeh / Fingerprint-Based LED Control System.ino
Created March 26, 2025 00:53
In this exciting project, I will guide you through the process of creating a fingerprint-activated device that controls multiple LEDs using an Arduino Nano. This device can identify fingerprints and turn on or off one or several LEDs based on the recognized fingerprint.
#include <Adafruit_Fingerprint.h>
#define FINGERPRINT_TX 2
#define FINGERPRINT_RX 3
#define ROCKER_SWITCH_ENROLL 8
#define ROCKER_SWITCH_CLEAR 11
#define LED_RED 9
#define LED_GREEN 10
// Additional LEDs for fingerprint ID indication
@cyrusmeh
cyrusmeh / DIY Thermal Imaging Camera with Arduino Nano & AMG8833 | Real-Time Heat Mapping code1.ino
Created March 20, 2025 23:48
In this exciting project, I demonstrate how to create a real thermal scanning camera using an Arduino Nano board, an AMG8833 thermal camera, and a 3.5-inch TFT LCD Module (SPI, 8 Pin).
#include <Wire.h>
#include <Adafruit_AMG88xx.h>
#include <SPI.h>
#include "Ucglib.h"
// Create an instance of the thermal camera
Adafruit_AMG88xx amg;
// Create an instance of the TFT display
Ucglib_ILI9341_18x240x320_SWSPI ucg(/*sclk=*/ 4, /*data=*/ 3, /*cd=*/ 6, /*cs=*/ 7, /*reset=*/ 5);
@cyrusmeh
cyrusmeh / Build a Simple Thermometer with WeMos D1 Mini and AMG8833 Thermal Camera.ino
Created March 19, 2025 17:21
In this project, we'll walk you through the process of building a simple thermometer using the WeMos D1 Mini, AMG8833 thermal camera, and a TM1637 4-digit 7-segment display module. You'll learn how to measure temperature with the thermal camera, transmit the data to the WeMos D1 Mini, and display the temperature in Celsius on the 7-segment displ…
#include <Wire.h>
#include <Adafruit_AMG88xx.h>
#include <TM1637Display.h>
// Define pins for TM1637 module
#define CLK D5
#define DIO D6
Adafruit_AMG88xx amg;
TM1637Display display(CLK, DIO);
@cyrusmeh
cyrusmeh / DIY Heart Rate & Blood Oxygen Monitor with MAX30102 and Arduino.ino
Created March 17, 2025 03:41
In this comprehensive tutorial, we’ll show you how to interface the MAX30102 Pulse Oximeter Sensor with an Arduino to measure two crucial health parameters: Heart Rate (BPM) and Blood Oxygen Concentration (SpO2). The MAX30102 sensor is perfect for creating wearable health monitoring devices, combining both heart rate and SpO2 measurement capabil…
#include <Adafruit_GFX.h> //OLED libraries
#include <Adafruit_SSD1306.h> //OLED libraries
#include "MAX30105.h" //MAX3010x library
#include "heartRate.h" //Heart rate calculating algorithm
////////////////////////////
//#include "ESP32Servo.h"
/////////////////////////////
MAX30105 particleSensor;
#include <Wire.h>
#include <TM1637Display.h>
#include <Keypad.h>
#include <esp_now.h>
#include <WiFi.h>
// TM1637 Setup
#define CLK 4
#define DIO 5
TM1637Display tm1637(CLK, DIO);