Skip to content
View kfahchai's full-sized avatar

Block or report kfahchai

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
kfahchai/README.md

Hi there, I'm Kean Fah Chai 👋

Typing SVG

Swinburne Sarawak Kuching, Malaysia

GitHub followers Profile views


🧑‍💻 About me

I'm an Electrical & Electronic Engineering student at Swinburne University of Technology, Sarawak Campus. I like working where hardware meets software. One week I'm configuring GPIO registers on a microcontroller, the next I'm writing a search algorithm that solves a puzzle in milliseconds.

Every project on this profile was built to understand how something works, not just to make it run. Each repository has a full write-up: what it does, how it works inside, how to run it, and the concepts behind it.

class KeanFahChai:
    def __init__(self):
        self.role       = "Electrical & Electronic Engineering Student"
        self.university = "Swinburne University of Technology, Sarawak Campus"
        self.based_in   = "Kuching, Sarawak, Malaysia 🇲🇾"
        self.focus      = ["Embedded systems", "Industrial communication (MODBUS)",
                           "Circuit analysis", "PCB design (KiCad)", "Traffic simulation", "GIS & machine learning", "Computer vision",
                           "AI search algorithms", "Game development"]
        self.languages  = {"C": "embedded & games", "C#": "OOP & games", "Python": "AI, tools & data",
                           "Ruby": "games", "HTML/CSS/JS": "web", "MATLAB": "engineering maths"}
        self.motto      = "Understand it, then build it."

🔬 What I'm working on now

Area Details
⚡ Embedded systems Register-level programming of the Raspberry Pi Pico (RP2040) on a Cytron EDU PICO board: GPIO, a 5×7 LED matrix with scrolling text from Serial and SD card
🏭 Industrial communication Implementing a MODBUS RTU slave over RS-485 on the Pico, and researching the protocol's history, architecture, physical layer and data model
🎙️ IoT / sensing (group project) Smart Noise Monitor: PDM microphone sound levels from two Picos to a Node-RED dashboard over MODBUS
🚦 Traffic engineering SUMO ⇄ Simulink fuzzy traffic control for Kuching's ART corridor
⛰️ Research (YRP 2026) Machine-learning landslide susceptibility mapping of Kundasang, Sabah with QGIS and Sentinel-2
🔌 Circuits & electronics Lab work building, measuring and analysing circuits: Thevenin/Norton equivalents and circuit response
📐 Engineering maths Mathematical methods and statistics in MATLAB live scripts

🛠️ Skills & tools

Domain Technologies
Programming languages C C# Python Ruby JavaScript MATLAB
Embedded & hardware Raspberry Pi Pico MODBUS RTU Node-RED KiCad PCB design Circuit analysis
Simulation & control Simulink SUMO Fuzzy logic
GIS & machine learning QGIS scikit-learn XGBoost and LightGBM Sentinel-2
AI & algorithms BFS A* search Minimax YOLOv8 OpenCV Streamlit Jupyter
Desktop apps & data Tkinter SQLite Matplotlib FPDF Pygame
Game development SplashKit raylib Gosu SDL2
Web HTML5 CSS3 Responsive design TensorFlow.js REST APIs
Tools Git GitHub VS Code GCC

🚀 Featured projects

Click a project name to open its repository. Each one has screenshots, setup steps and a technical walkthrough.

🔧 Engineering design & research

KiCad PCB design Digital logic Python

A round, 80 mm, 2-layer PCB: a 555 timer clocks a CD4017 decade counter that chases a ring of 10 LEDs, with adjustable speed. (Personal hardware project)

  • Full schematic → layout → Gerbers flow: net classes, GND pours, thermal reliefs and reverse-polarity protection. Verified in KiCad 10: ERC and DRC 0 errors, PCB and schematic in parity, 3D view.
  • Design as code: the schematic and PCB are generated from one Python description using the KiCad API, plus a small custom A* autorouter.
  • Fab-ready Gerber zip, BOM, assembly guide, and photo-style renders with an animated chase.

Python QGIS XGBoost LightGBM scikit-learn Sentinel-2

My Young Researcher Program 2026 research project: where are landslides most likely around Kampung Mesilau, below Mount Kinabalu?

  • Built a 198-point landslide / non-landslide inventory (2013–2025) and 17 conditioning factors from the AW3D30 DEM and Sentinel-2 imagery in QGIS.
  • Removed redundant factors with Pearson correlation and VIF/TOL tests, then compared six models: XGBoost, LightGBM, Random Forest, CatBoost, AdaBoost and SVM.
  • XGBoost scored best (ROC-AUC 0.840); NDVI, elevation and distance to river were the strongest factors.
  • Produced five-class susceptibility maps showing about 28–30 % of the area as High or Very High.

SUMO TraCI Python MATLAB/Simulink Fuzzy Logic

Smart traffic signals for Kuching's new ART corridor. (ENG20010 Engineering Technology Design Project)

  • Real OpenStreetMap road networks of Jalan Tun Salahuddin and the Darul Hana station area, simulated in SUMO 1.24.
  • A Python TraCI server streams detector data as JSON over TCP to a MATLAB System object inside Simulink, which sends phase commands back.
  • Mamdani fuzzy controllers (15-input roundabout controller, 6-input pedestrian-safety controller) choose signal timing, pedestrian green and emergency halts.

C++ / Arduino Raspberry Pi Pico W Modbus RTU RS-485 Node-RED

Two networked sound-level meters with alarms and a live dashboard. (ENG20009 Engineering Technology Inquiry Project, group project)

  • Dual-core firmware: core 0 serves Modbus only, so polling never times out; core 1 handles the microphone, FFT, alarms, LEDs and OLED.
  • Measures Leq, peak, minimum, mPa, dBFS, dominant frequency and noise dose, with an OK → WARNING → ALARM → MUTED state machine.
  • 17 input + 8 holding registers; settings are written from Node-RED and kept in EEPROM.

🤖 Artificial intelligence: computer vision, search & game-playing agents

Python YOLOv8 OpenCV Streamlit Roboflow

Spots missing and imprecisely placed products on supermarket shelves and checks them against a planogram. (COS30018 Intelligent Systems)

  • Human-in-the-loop active learning: model-assisted re-annotation lifted mAP50 from 0.688 to 0.849.
  • 34 training runs comparing SGD vs AdamW, learning rates, epochs and YOLOv8n vs v8s. Best models: Missing mAP50 0.952, combined 0.863.
  • Planogram compliance with SIFT keypoints, RANSAC homography and IoU slot matching.
  • Streamlit app with Detection, Planogram and Contribute pages; user-confirmed detections feed the next training round.

Python Matplotlib A* Search

A playable 3×3 sliding-tile puzzle with a one-click AI solver.

  • A* search with an admissible Manhattan-distance heuristic, so every solution it returns is the shortest possible.
  • Shuffle makes only solvable boards, checked by inversion parity.
  • Animated, dark-themed Matplotlib GUI with a move counter and click-to-slide controls.
  • Includes a unit test that checks the solver on a known position.

Python Matplotlib Breadth-First Search

The classic river-crossing puzzle, playable by hand or solved by AI.

  • Models the puzzle as a state-space search problem with an immutable, hashable @dataclass state.
  • Breadth-First Search finds the optimal 11-move solution and animates the boat crossing.
  • Game rules and solver live in a UI-free logic module, separate from the GUI.
  • Includes an explanatory Jupyter notebook and an automated Chinese translation of it.

Python Jupyter Adversarial Search

An unbeatable Tic-Tac-Toe agent built on the AIMA framework.

  • Alpha-Beta pruning gives the same result as full Minimax while skipping branches that can't change the outcome.
  • I extended the framework so it can start from any custom mid-game position and replay every move.

🎮 Game development

C# .NET 8 SplashKit OOP Design Patterns

A 2D pixel-art mining game. Dig through a randomly generated maze, collect diamonds before time runs out, and keep a thieving ghost away. (COS20007 Object-Oriented Programming. The original version won the unit's top-scorer award; this repo is a rebuild.)

  • Random mazes from a depth-first recursive backtracker, with ore embedded only where it can be reached.
  • Mining system: block strength vs. tool efficiency, stamina, an inventory, a store, tool upgrades and a 3×3 bomb.
  • Five design patterns: State (screens), Factory (items, blocks, levels), Strategy (the ghost attacks or steals), Singleton (sound) and Observer (item events).
  • Headless logic tests, including a bot that wins all three levels on random mazes, plus original pixel art and chiptune sounds generated in code.

C raylib

A complete lane-defence game in about 2,400 lines of C.

  • Sun economy, 4 plant types plus a shovel, lawnmowers, and a wave system that gets harder as you play.
  • Object pools for zombies, projectiles, suns and particles, so nothing is allocated during the game loop.
  • Depth-sorted sprite rendering with qsort, and a resolution-independent render target that scales to any window.
  • Particle system (explosions, confetti, rain), hit-flash effects, zombie heads that pop off, and settings saved to a binary file.

Ruby Gosu

A top-down, wave-based shooter.

  • Vector-based mouse aiming, knockback, AABB collision detection and random item drops.
  • A seven-screen state machine (menu, profile, instructions, high scores, round intro, play, game over).
  • Player profiles and a high-score leaderboard saved to files.
  • An early C + SDL2 port is in progress.

🖥️ Desktop applications & data tools

Python Tkinter SQLite Matplotlib

A sales-reporting tool for small businesses.

  • Calculates total sales, profit/deficit and ROI automatically.
  • Relational SQLite database (reports → line items) that keeps every saved report.
  • Bulk import from text files with validation of every line, plus full search / modify / delete for items.
  • Profit/deficit chart for each item, and your unsaved work is restored when you reopen the app.

Python Tkinter Matplotlib FPDF

A dashboard for tracking a sales team.

  • Total, average, highest and lowest sales, plus target tracking that lists who is above or below target.
  • Bar charts and one-click PDF report export.
  • Layered architecture: UI, business logic and output are separate modules.

Python Tkinter Pygame

A unit converter that makes measurement fun.

  • Six standard categories: length, area, volume, weight, temperature and 12/24-hour time.
  • Fun Mode converts between real-world objects, such as ants, the Eiffel Tower, Malaysia, the Moon and dog years.
  • Conversion history, sound effects and theme switching. The conversion maths is kept as pure functions, separate from the UI.

🌐 Web development

HTML5 CSS3 JavaScript TensorFlow.js REST APIs

A 13-page citizen-science website for Malaysia's Endangered, Rare and Threatened plants, with about 11,000 lines of hand-written HTML, CSS and JavaScript.

  • AI plant identifier: photos go to the Pl@ntNet API (top-3 species with match %). Non-plant photos are labelled by a Hugging Face ViT model. An offline TensorFlow.js MobileNet + k-NN engine takes over when there's no API key or no internet.
  • FloraBot chat assistant built with DOM methods: keyword-rule matching, actions such as switching theme or language, and chat history in sessionStorage.
  • Full translation into English, Bahasa Melayu and 中文, using a MutationObserver, a WeakMap and regex-based message matching.
  • Dark mode with no white flash, an animated card filter, an accessible FAQ accordion, a slideshow with swipe support, a lightbox, and scroll-triggered animations.

HTML5 CSS3 JavaScript

An 18-page responsive website for a fictional Malaysian coffee chain, written by hand with no frameworks.

  • Sticky frosted-glass navbar with dropdowns, and a hamburger menu on mobile.
  • Product menus, an events section with galleries, membership, careers and contact pages.
  • Forms with HTML5 validation (patterns, required fields, semantic input types).
  • A consistent design system built on CSS custom properties.

📘 Practice & fundamentals

Repository Contents
Python Programming Exercises 31 programs by topic: conditionals, loops, nested patterns, functions, file I/O and MySQL
STPM C Past-Year Solutions Fully commented C solutions to STPM exam questions (2013–2021): arrays, structs, functions, validation

🎓 Coursework map

Course Topic Related work
COS30018 Intelligent Systems Retail AI Vision: YOLOv8 shelf monitoring + planogram compliance
COS30019 Introduction to Artificial Intelligence Klotski A* solver · Missionaries & Cannibals BFS · Tic-Tac-Toe Alpha-Beta
COS20007 Object-Oriented Programming Mining-Maze Game (C# / SplashKit)
COS10009 Programming Zombie Garden (C / raylib)
COS10005 Web Development FloraMY: AI plant-identification website
COS10026 Web development Brew & Go website
ENG20009 Engineering Technology Inquiry Project Smart Noise Monitor: PDM mic + MODBUS RTU on Raspberry Pi Pico → Node-RED
ENG20010 Engineering Technology Design Project SUMO ⇄ Simulink fuzzy traffic control (Python / MATLAB)
EEE20006 Circuits & electronics Lab work: Thevenin/Norton, circuit response
MTH20017 Mathematical Methods & Statistics for Engineering MATLAB live-script labs
YRP 2026 Young Researcher Program (research) ML landslide susceptibility mapping, Kundasang (QGIS / Python)

📈 GitHub stats

GitHub stats Top languages

GitHub streak


🤝 Let's connect

I'm always happy to talk about embedded systems, industrial automation, AI or game development. If you're working on something interesting, or have an internship or collaboration in mind, feel free to reach out.

Thanks for stopping by! If a project interests you, a ⭐ is always appreciated.

Popular repositories Loading

  1. CMA-PERFORMANCE-PRO CMA-PERFORMANCE-PRO Public

    Sales Performance Analyzer application built with Python's tkinter library for the graphical user interface.

    Python

  2. DYDX-Sales-Report-Generator DYDX-Sales-Report-Generator Public

    A comprehensive Sales Report Generator application built with Python and tkinter

    Python

  3. JAV-Converter JAV-Converter Public

    A sophisticated unit conversion application built with Python's tkinter for the GUI and pygame for sound effects

    Python

  4. PYTHON-IN-CLASS-QUESTION PYTHON-IN-CLASS-QUESTION Public

    A collection of exercise written with python

    Python

  5. STPM-C-IN-CLASS-QUESTION STPM-C-IN-CLASS-QUESTION Public

    A collection of exercise written with C

    C

  6. SPOOKY-HALLOWEEN-MASTER SPOOKY-HALLOWEEN-MASTER Public

    This is a Halloween-themed survival shooting game where players need to control the character to fend off the continuously incoming zombies.

    C