程鈺涵
    • Create new note
    • Create a note from template
      • 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
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

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

      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.
      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
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control 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
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

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

    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.
    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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Multi-WiFiS4A【 II 】--- 安裝教學 ###### tags: `Multi-WifiS4A` 1. 請先完成 “[Multi-WiFiS4A 【 I 】---下載截圖說明](https://hackmd.io/s/B1bSCBzUb)” 之步驟 2. 完成安裝教學後,下一步請至[Multi-WiFiS4A【 III 】--- s4a積木使用](https://hackmd.io/s/HJhGPQb_Z) --- <!-- * [燒錄wifi模組D1 mini需要的lib](https://wiki.wemos.cc/products:d1:d1_mini) (解壓縮後放進Arduino目錄下) !--> ## Server --- :::warning 1. 在程式碼資料夾(D:\D:\Multi_WifiS4a-master)下,滑鼠游標移至檔名 `server.js`按右鍵,用開啟檔案>選擇文字編輯器開啟(eg. Wordpad, notepad++....) --- 2. 將第2行(HOST='IP')修改為自己的ip位址 (如何查看IP[^first]) ![](https://i.imgur.com/olczjZa.png) [^first]: 查看IP: * Windows:在命令提示字元輸入 `ipconfig` ![](https://i.imgur.com/vOfUpO2.png) * Linux, Os X:在終端機輸入 `ifconfig` ![](https://i.imgur.com/Kv8OhM4.png) 3. PORT = 8888; ==可以不用改== (自由設定) --- 4. 開啟「命令提示字元」輸入`node D:\Multi_WifiS4a-master\server.js` (將檔案從資料夾拖曳至命令列提示字元視窗,路徑會自動產生) 例:![](https://i.imgur.com/pFircXi.png) --- 5. 按下Enter,會出現安全性警告,點選允許存取 ![](https://i.imgur.com/soycH2u.png) --- 6. 出現**Server listening on xxx.xxx.xxx.xxx** 即成功開啟server: 例: ![](https://i.imgur.com/fSpEzIX.png) ::: --- ## Wifi模組(D1_mini) :::success 1. 將 Wifi模組 D1_mini接上電腦 2. 開啟程式碼檔名為 `Client.ino`的檔案 3. 修改程式碼的連線設定(需與 server連相同的網域) ``` #define SSID "wifi名稱" #define PASSWD "wifi密碼" #define TCP_IP "server的IP" #define TCP_PORT server開的PORT ``` 例:![](https://i.imgur.com/BUPZBJo.png) 4. 設定裝置ID `#define deviceID ID` (ID可自由設定) 例:![](https://i.imgur.com/UGnI5gK.png) > 註:ID 以16進位表示,若ID設10,server端會顯示Ca,C為client的意思;因此ID設15,會顯示Cf;ID設16,會顯示C10 5. 於上排工具列的`工具`頁籤中選擇要燒錄的板子型號D1_mini ![](https://i.imgur.com/48LwY3W.png) * Board目錄下有很多種板子,往下滑點選==WeMos D1 R2 & mini== ![](https://i.imgur.com/xVh6013.png) 6. 手動選擇序列埠(Port)。如果不知道Wifi模組連接的是哪個序列埠(Port),可以先到「裝置管理員」看[^second]。 ![](https://i.imgur.com/Gck4f4i.png) 7. 點選箭頭,上傳程式碼至板子 ![](https://i.imgur.com/WJVUezX.png) 8. 點開序列埠監控視窗,可以看到訊息 ![](https://i.imgur.com/HYj3bMH.png) 9. 連不上的狀況有兩種: 1. 沒有連到網路(SSID或密碼打錯): ![](https://i.imgur.com/86AuI5K.png) 成功訊息: ![](https://i.imgur.com/DeeVYfG.png) 2. 沒有連到server: ![](https://i.imgur.com/uzsYtXK.png) 成功訊息: ![](https://i.imgur.com/7GlPM9t.png) 10. 看開著server的「命令提示字元」,出現如下圖所示,表示Wifi模組成功連線至Server ![](https://i.imgur.com/qu2kSLH.png) 11. 開啟程式碼檔名為 `wifionuno.ino`的檔案,重複第3點之後的步驟。 * ID開頭辨識:C 為client代表按鈕上的WIFI模組; X 代表uno上的WIFI模組 ![](https://i.imgur.com/diy69u2.png) ::: ## Uno :::info 1. 開啟程式碼檔名為 `uno.ino`的檔案 2. 將UNO板接上電腦 3. 上傳程式碼前,須先將S4A軟體關閉 (因為是使用同一個連接埠在傳遞訊息) 4. 點選箭頭,上傳程式碼至板子 ![](https://i.imgur.com/WJVUezX.png) > 傳畢,若看「序列埠監控視窗」會跑亂碼或問號,此為正常現象,是板子與s4a溝通的訊息。 2. 開啟S4A,等五秒左右,若Searching board的訊息窗消失,表示S4A成功讀取UNO板 ![](https://i.imgur.com/24R4HdT.png) ::: ## 裝置接線 :::danger * Client部分: * 元件介紹: 1. 電池座 ![](https://i.imgur.com/9vPehb1.jpg) 2. 裝置盒 ![](https://i.imgur.com/P1Va5iC.jpg) 3. wifi模組 ![](https://i.imgur.com/KKu44wG.jpg) * 接線說明: 1. 電池與Wifi模組: * 負極(-)接G * 正極(+)接5V ![](https://i.imgur.com/EFZmygU.jpg) 2. 電池與按鈕: * 負極(-)接按鈕任一隻腳 3. 按鈕與Wifi模組: * 按鈕空的那腳接到模組的D4 * ![](https://i.imgur.com/6egmtme.png) * wifi_on_uno: 1. ![](https://i.imgur.com/14Uuadz.png) ::: <!-- [常見的連接埠](http://web.mit.edu/rhel-doc/4/RH-DOCS/rhel-sg-zh_tw-4/ch-ports.html)!--> [^first]: 開啟「命令提示字元」 * Windows: * 打快速鍵"windows+x",會跳出功能列表,點選「裝置管理員」 ![](https://i.imgur.com/XaMSiKk.png) 有些電腦會是英文表示: ![](https://i.imgur.com/du2LBbK.jpg) * Mac OSX: * 點開Lauchpad ( 使用拇指和三指撥合 ) ![](https://i.imgur.com/49BOwpA.png) * 於「其他」資料夾,會看到Terminal ![](https://i.imgur.com/qFaEyd1.png) [^second]: 查看連接埠COM * Windows: * 打快速鍵"windows+x",會跳出功能列表,點選「裝置管理員」 ![](https://i.imgur.com/gaqC1Ob.png) * 點開「連接埠(COM和LPT)」,若有 USB-SERIAL CH340() 則表示電腦成功讀取 wifi模組 * 若還是沒讀到,請下載[驅動程式](https://wiki.wemos.cc/downloads),載完執行後,需要重新開機 ![](https://i.imgur.com/vJ96ML5.png) * Os X: ![](https://i.imgur.com/CsqDpEi.png) Hardware > USB ![](https://i.imgur.com/xtskRfB.png) <!-- ==windows== hardware 解壓後不用放到libraries裡面喔!直接放在Arduino下 ![](https://i.imgur.com/aN2deaO.png) ==OS X== ![](https://i.imgur.com/V8HWJls.png) !-->

    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

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    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