Phe Dev
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Lộ trình dạy Python cho học sinh lớp 11 (mục tiêu: theo học ngành **tự động hóa** tại Canada) Đây là một **lộ trình chi tiết**, từ nền tảng lập trình Python cho học sinh 17–18 tuổi tới các kỹ năng chuyên sâu cần cho tự động hoá (robotics/industrial automation/software automation). Nội dung gồm: mục tiêu năng lực, lộ trình 1 học kỳ (15 tuần), lộ trình 2 năm mở rộng, phương pháp dạy/học, bài giảng mẫu, bài tập dự án, tiêu chí đánh giá và danh sách nguồn tài nguyên. --- # Mục tiêu tổng quát (sau khóa) 1. Học sinh có tư duy lập trình: biến, hàm, cấu trúc điều khiển, cấu trúc dữ liệu cơ bản. 2. Có khả năng thiết kế, triển khai và debug chương trình Python sạch (modular, có test cơ bản). 3. Biết sử dụng Git, môi trường ảo, Jupyter để workflow khoa học. 4. Ứng dụng Python vào tự động hóa: điều khiển phần cứng (Raspberry Pi / micro:bit / Arduino), xử lý dữ liệu cảm biến, điều khiển PID cơ bản, giao tiếp serial, scripting tự động (web scraping / test automation). 5. Có dự án capstone thể hiện vòng khép kín cảm biến → xử lý → tác động (sensor → logic → actuator). 6. Hiểu các con đường cao hơn: kỹ thuật điều khiển, mechatronics, robotics, automation engineering. --- # Ba đường chuyên môn (tùy mục tiêu học sinh) - [Đã có] **Software Automation / Test / DevOps**: scripting tự động, web scraping, Selenium, CI/CD, logs & monitoring. - [Đang xây dựng] **Industrial/Process Automation (công nghiệp)**: PLC, SCADA, fieldbuses, điều khiển PID, bảo trì tự động hoá. (Python hữu ích cho data logging, analytics, test bench, giao tiếp OPC-UA). - [Đang xây dựng] **Robotics & Mechatronics**: ROS cơ bản, điều khiển động cơ, cảm biến, SLAM, vision. Trong lớp 11, tập trung 60% fundamentals + 40% hướng ứng dụng (hardware projects, scripting). Sau này học sinh chọn deep-dive. --- # Công cụ & thiết lập lớp học - Python 3.10+ (đề nghị 3.11), VS Code + Python extension, JupyterLab. - Git + GitHub (repo cho bài tập). - Virtual environments: `python -m venv venv` hoặc `pipx`. - Hardware kit (cho nhóm 2-3 học sinh): Raspberry Pi 4 (hoặc Pi Zero 2W) **hoặc** micro:bit + Arduino (đơn giản hơn cho bắt đầu), bộ cảm biến cơ bản (DHT22 temp/humidity, HC-SR04 ultrasonic, photoresistor), 1 bộ relay 1–2 channel, 1 servo, breadboard, dây. - Thư viện Python quan trọng: `pandas`, `numpy`, `matplotlib`, `gpiozero`/`RPi.GPIO` (Pi), `pyserial`, `opencv-python` (cho vision), `pytest` (test), `requests`, `selenium` (nếu dạy web automation). - Môi trường mạng cho Raspberry Pi (LAN) và power-safe (nguồn, bảo vệ điện). --- # Lộ trình 1 học kỳ (15 tuần) — mục tiêu: từ không biết tới build project tự động hóa nhỏ Mỗi tuần: 2 tiết lý thuyết + 1 tiết lab thực hành (hoặc 90–120 phút session + lab). Kèm bài tập về nhà. ## Tuần 1 — Giới thiệu & mindset - **Mục tiêu:** hiểu tư duy tường thuật, biến/chương trình, môi trường dev. - Nội dung: Python syntax cơ bản (print, biến, kiểu dữ liệu), IDE, venv, Git init, Jupyter. - Lab: "Hello world", tạo repo, push commit đầu tiên. - Bài tập: mini-challenge: converter độ C ↔ độ F với input người dùng. ## Tuần 2 — Cấu trúc điều khiển - **Mục tiêu:** if/else, vòng lặp `for`/`while`, break/continue. - Lab: trò chơi đoán số, in bảng nhân, phân tích log đơn giản. - Giải thích gốc rễ: cách trình thông dịch thực thi câu lệnh tuần tự → nhánh → lặp. ## Tuần 3 — Hàm & modular hóa - **Mục tiêu:** viết hàm, tham số, giá trị trả về, phạm vi biến, docstring. - Lab: viết module `metrics.py` có hàm `mean`, `median`, `std`. - Giáo án: solid reasons to decompose — reuse, testability. ## Tuần 4 — Str, list, tuple, dict, set - **Mục tiêu:** các cấu trúc dữ liệu chuẩn, khi nào dùng cái gì (complexity high level). - Lab: phân tích file CSV (không dùng pandas): đếm tần suất từ, top-5. - Giải thích rễ: tradeoffs (mutable vs immutable, lookup complexity). ## Tuần 5 — File I/O & exception handling - Đọc/ghi file, JSON, context manager `with`, `try/except`. - Lab: logging sensor-simulated data vào CSV. ## Tuần 6 — Làm việc với thư viện: requests, parsing - HTTP cơ bản, JSON parsing, rate-limits (concept). - Lab: đơn giản: lấy thời tiết (mock) và lưu dữ liệu. ## Tuần 7 — Numpy & Pandas cơ bản (data handling) - Vectorized ops, DataFrame, filtering, groupby basics. - Lab: xử lý log sensor → biểu đồ trend (matplotlib). ## Tuần 8 — Visualisation & reporting - Matplotlib cơ bản, xuất báo cáo HTML (Jupyter notebook → PDF). - Lab: dashboard đơn giản trong Jupyter. ## Tuần 9 — Git workflow & testing - Branches, PR cơ bản (show flow), unit test với `pytest`. - Lab: viết tests cho `metrics.py`, CI cơ bản (giải thích GitHub Actions khái quát). ## Tuần 10 — Giao tiếp phần cứng: serial & GPIO (lý thuyết + lab) - Khái niệm UART/Serial, I2C, SPI (overview); dùng `pyserial`, `gpiozero` để đọc sensor. - Lab: Raspberry Pi đọc DHT sensor, in ra console, lưu CSV. ## Tuần 11 — Điều khiển actuator & logic thời gian thực - PWM, servo control, relay control. Giải thích vòng lặp feedback. - Lab: bật/tắt đèn theo threshold sensor (photoresistor) + debounce. ## Tuần 12 — Control basics: PID concept (phiên bản đơn giản) - Giải thích: error, proportional/integral/derivative, sampling time. - Lab: mô phỏng PID trong Python điều khiển mô tơ ảo; áp dụng threshold cho servo. ## Tuần 13 — Networking & remote control - Socket basics, HTTP server nhỏ (Flask/fastapi giới thiệu), bảo mật cơ bản. - Lab: tạo web UI nhỏ điều khiển relay (button on/off). ## Tuần 14 — Project sprint (nhóm 2–3) - Yêu cầu: sensor → logic → actuator + logging + report. - Ví dụ: hệ thống tưới cây tự động: đo độ ẩm đất, điều khiển relay pump, log dữ liệu. ## Tuần 15 — Trình bày & đánh giá - Demo project, code review, report, retrospective (sinh viên viết what went well). --- # Lộ trình 2 năm (nới rộng cho chuyên sâu automation) **Năm 1 (grade 11)**: như trên + thêm elective về robotics cơ bản. **Năm 2 (grade 12 hoặc club/after-school):** bốn module nâng cao (mỗi module ~8–10 tuần) 1. **Robotics & ROS Intro** - ROS2 basics, publishers/subscribers, TF, controlling motors, SLAM high level. - Project: robot line-following with camera (OpenCV) + PID. 2. **Industrial Automation Basics** - PLC concept & ladder logic (theory), OPC-UA concept, SCADA high-level, safety. - Data acquisition: MQTT, Modbus (concept) + Python client simulations. - Project: simulate a small process (tank fill/drain) và giám sát/alarms. 3. **Computer Vision & ML Foundations** - OpenCV basics: edge detection, contours, simple object detection. - ML basics: supervised learning pipeline, scikit-learn, model evaluation. - Project: camera detect object presence → trigger actuator. 4. **Software Automation & DevOps for Automation** - Test automation, CI/CD basics, containerization (intro to Docker), logging & monitoring. - Project: automated test suite & deployment pipeline for earlier project. --- # Phương pháp dạy & chiến lược lớp học - **Project-based learning**: mỗi module có project nhỏ, cuối kỳ có capstone. - **Pair programming & code review**: phát triển kỹ năng cộng tác. - **Scaffolded challenges**: từ guided → semi-guided → open-ended. - **Emphasize debugging**: teach reading tracebacks, using debugger, test-first mentality. - **Explain fundamentals deeply**: khi dạy list/dict, giải thích memory model, tham chiếu vs copy, complexity Big-O concept đơn giản. - **Safety & ethics**: điện, nước, pin, data privacy, và ethics khi dùng camera/network. --- # Bài giảng mẫu ## Tuần 3 (Hàm & modularization) — ví dụ chi tiết ### Mục tiêu - Học sinh biết viết hàm, document, import module, và viết test đơn giản. ### Nội dung chính (giải thích gốc rễ) - **Tại sao hàm?** Tách vấn đề lớn thành phần nhỏ: dễ hiểu, tái sử dụng, dễ test. - **Pure function vs side-effect**: pure function dễ test vì output chỉ phụ thuộc input. - **Scope**: local vs global — tránh biến global để giảm coupling. ### Ví dụ code (đưa trực tiếp vào lớp, giải thích từng dòng) ```python # metrics.py def mean(values): """Return arithmetic mean of a non-empty list of numbers.""" if not values: raise ValueError("values must be non-empty") return sum(values) / len(values) def variance(values): m = mean(values) return sum((x - m)**2 for x in values) / len(values) def stddev(values): return variance(values) ** 0.5 ``` ### Lab - Viết file `test_metrics.py` với `pytest`: ```python # test_metrics.py from metrics import mean, variance, stddev import pytest def test_mean_simple(): assert mean([2,4,6]) == 4 def test_mean_empty(): with pytest.raises(ValueError): mean([]) ``` - Chạy: `pytest -q` và đọc lỗi nếu có. ### Bài tập về nhà - Thêm hàm `median` và test cho cả số chẵn/lẻ, giải thích algorithmic difference (sort + pick middle). ## Tuần 10 — Giao tiếp phần cứng: serial & GPIO (lý thuyết + lab) ### Nội dung chính #### Giao tiếp serial vs I2C vs SPI - **Serial/UART**: point-to-point, byte stream. Dễ debug (serial console). - **I2C**: bus multi-device, master/slave, address-based. Dùng cho sensors nhỏ. - **SPI**: nhanh, full-duplex, cần nhiều dây CS; thường cho ADCs, high-speed devices. - **Khi dạy**: trình bày tradeoffs, dùng Pi để demo pyserial + I2C sensor. --- # Đề xuất dự án capstone (ý tưởng, deliverables, rubric) ## Ví dụ capstone: **Hệ tưới cây tự động thông minh** - **Yêu cầu**: đo độ ẩm đất (sensor), lưu dữ liệu, tự kích bơm khi cần, có web UI để xem lịch sử và bật/tắt manual, có báo cáo hiệu suất. - **Deliverables**: - Code repo (clean, có README, instructions), tests cơ bản. - Schematic wiring & safety notes. - Demo video 3–5 phút. - Final report (analysis + charts + lessons learned). - **Rubric (100 điểm)**: - Functionality (40): hoạt động sensor→actuator, logging, UI basic. - Code quality & tests (20): modular, docstrings, tests pass. - Design & safety (10): wiring, protection, debounce, power handling. - Analysis & visualization (10): dữ liệu thu thập + insight. - Presentation (10): clarity demo + teamwork. - Creativity/extension (10): thêm scheduling, ML prediction, mobile UI. --- # Đánh giá & kỳ thi - Formative: quizzes nhỏ, code katas, peer review. - Summative: midterm (theory + coding), final project demo. - Rubrics minh bạch công khai trước khi bắt đầu project. --- # Tài nguyên đề xuất (sách / nền tảng / hardware) - Sách/Guides: *Automate the Boring Stuff with Python* (tốt cho scripting), *Python Crash Course*. - Platforms: Jupyter, repl.it (nhanh), GitHub Classroom cho assignments. - Hardware: Raspberry Pi kit (1 kit/2–3 hs), micro:bit cho bắt đầu an toàn rẻ tiền. - Thư viện: `gpiozero` (Pi wrapper cho học sinh), `pyserial`, `pandas`, `matplotlib`, `opencv-python`. - Ngoài ra khuyến khích tham gia clubs/competitions robotics/skills Canada. --- # Lộ trình chuyển tiếp lên đại học / nghề nghiệp (gợi ý) - Khuyến khích học sinh tham gia co-op, internships, makerspace. - Học thêm: control systems (university course), PLC vendor courses (Siemens/Allen-Bradley) nếu hướng công nghiệp, ROS/robotics nếu hướng robotics. - Portfolio: GitHub + video demos + writeups — rất quan trọng với tuyển sinh/việc làm.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully