FlagMaker
      • 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
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • 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
    • Engagement control
    • 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
Engagement control 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
Engagement control Commenting, Suggest edit, Emoji Reply
  • 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
    7
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ###### tags: `Thonny` # 安裝 Thonny 軟體 [TOC] 要使用 MicroPython 撰寫程式, 雖然有許多可以選擇的開發環境, 但最方便的就是 [Thonny](https://thonny.org/)。Thonny 輕薄短小, 不但可作為開發一般電腦 Python 程式的環境, 也針對各種微控制板設計了對應的功能, 因此我們選擇使用 Thonny。 ## 軟體安裝 ### 在 Windows 上安裝 Thonny 在 Windows 上只要下載安裝檔, 執行後依照安裝步驟即可。 1. 請至[官網首頁](https://thonny.org/)右上角點選下載連結: ![](https://i.imgur.com/nEPEdox.png) :::warning 最新 4.x 版本在燒錄韌體時似乎有問題, 如果你要燒錄 MicroPython 韌體, 請下載 [3.3.13 版](https://github.com/thonny/thonny/releases/tag/v3.3.13) ::: :::info 由於 Thonny 4.0.1 開始[改用 64 位元版本的 Python 3.10](https://github.com/thonny/thonny/releases), 因此無法在 32 位元以及 Windows 7 作業系統上執行, 在 Windows 7 會出現以下錯誤: ![](https://i.imgur.com/kvqoSkr.png) 請改成下載使用 32 位元 Python 3.8 的 [thonny-py38-4.0.1.exe](https://github.com/thonny/thonny/releases/download/v4.0.1/thonny-py38-4.0.1.exe)。 ::: 1. 下載後直接執行: :::info 若出現安全性畫面, 請按**仍要安裝**或是 **Install anyway**: ![](https://i.imgur.com/CwuqAmi.png) ::: ![](https://i.imgur.com/EPW8vj6.png) 按 **Next**。 1. 按 **I accecpt the agreement** 後按 **Next**: ![](https://i.imgur.com/CAAnA2x.png) 1. 確認安裝路徑後按 **Next**: ![](https://i.imgur.com/NzU3gb6.png) 1. 繼續按 **Next**: ![](https://i.imgur.com/D9F01sZ.png) 1. 請勾選 **Create desktop icon** 方便執行 Thonny: ![](https://i.imgur.com/8NAJwaC.png) 按 **Next** 繼續。 1. 確認無誤後按 **Install** 進行安裝: ![](https://i.imgur.com/hC1HuX1.png) 1. 安裝完成按 **Finish**: ![](https://i.imgur.com/BLiWrTz.png) 1. 可在桌面上找到執行 Thonny 的捷徑: ![](https://i.imgur.com/pHH9IEX.png) 或者利用搜尋方式找到 Thonny: ![](https://i.imgur.com/xENbFVQ.png) ### 在 Mac 上安裝 Thonny 在 Mac 只需要下載安裝檔案執行後依照步驟即可。 1. 請至[官網首頁](https://thonny.org/)右上角點選下載連結: ![](https://i.imgur.com/jvM19nr.png) 1. 下載後直接執行: ![](https://i.imgur.com/0KMNGMs.png) 按**繼續**。 1. 再按 **執行**: ![](https://i.imgur.com/i534bw1.png) 按 **同意**: ![](https://i.imgur.com/mrPRx4n.png) 1. 按 **安裝**: ![](https://i.imgur.com/PHnXBOn.png) 這裡會需要鍵入你的密碼, 請鍵入後即可繼續安裝。 1. 安裝完成按 **關閉**: ![](https://i.imgur.com/zJHZOrs.png) 1. 接著就可以在**啟動器**中找到 Thonny。 ### 在 Linux 上安裝 Thonny 在 Linux 上雖然可以使用套件管理系統安裝打包好的 Thonny, 不過版本比較舊, 請依照以下步驟安裝新版的 Thonny: 1. 在 Thonny 官網首頁右上方按一下 **Linux** 字樣可以顯示 Linux 安裝的指示: ![](https://i.imgur.com/nNfPrYZ.png) 2. 複製 "Binary bundle for PC" 項目的指令。 4. 開啟終端機, 在終端機中貼上複製的指令執行即可: ``` $ bash <(wget -O - https://thonny.org/installer-for-linux) 正重新導向輸出至「「wget-log.1」」。 This script will download and install Thonny (thonny-3.3.13) for Linux (32 or 64-bit PC). Press ENTER to continue or Ctrl+C to cancel. ... nstallation was successful, you can start Thonny from start menu under Education or Programming, or by calling /home/meebox/apps/thonny/bin/thonny For uninstalling Thonny call /home/meebox/apps/thonny/bin/uninstall Press ENTER to exit the installer. ``` 1. 將使用者加入 dialout 群組: ``` $ sudo usermod -a -G dialout <這裡要改成你的使用者名稱> [sudo] <你的的密碼>: ``` 執行後會需要你的密碼, 填入後按下 <kbd>enter</kbd> 即可。 1. 登出後重新登入, 加入群組的設定才會生效。 :::warning 若是沒有加入 dialout 群組, 在連線到控制板時會出現以下錯誤: ![](https://i.imgur.com/z40DsP9.png) 錯誤訊息中就會提示你將自己加入到 dialout 群組, 這是因為要使用 USB 與外部裝置傳輸資料需要特定的權限, 只要加入 dialout 群組就可以擁有所需的權限 ::: 1. 接著就可以在主畫面搜尋找到 Thonny 應用程式: ![](https://i.imgur.com/BjMl0HJ.png) ## 執行 Thonny 請依照個別平台找到 Thonny 執行捷徑, 然後依照下列步驟執行: 1. 請選取**繁體中文-TW** 語系後按 **Let's go!**: ![](https://i.imgur.com/MWZHvvm.png) 1. 即可看到 Thonny 主畫面: ![](https://i.imgur.com/Grs24hP.png) ## 設定 Thonny 環境 如果覺得畫面上字太小, 可以如下調整: 1. 執行『**工具/選項**』功能表指令開啟**選項**視窗, 切換到**主題與自行**頁次: ![](https://i.imgur.com/8ZREfCL.png) 右上方即可選取適當的字級大小。 2. 也可選取不同的主題配色, 後續都以如下配色展示: ![](https://i.imgur.com/F5z4oM6.png) 3. 如果覺得功能表下的工具列圖示太小: ![](https://i.imgur.com/cG1IYVH.png) 也可以在**選項**交談窗中切換到**一般**頁次, 調整**使用介面的縮放倍數**, 但要注意的是**這個設定必須重新開 Thonny 才會生效**。 1. 按**確認**關閉交談窗。

    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 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