Skip to content
wandererinhk edited this page Jul 14, 2017 · 21 revisions

本頁將簡介本擴展的功能,以及使用時的注意事項。

在使用前,請務必閱讀此頁,理解本擴展的限制。

This Wiki page will give more information on the extension's features and points to note when using this extension

Please read this pages carefully before actual usage. English version is located at the bottom of page.

功能:

  • 利用AT指令控制已刷非Makeblock原廠韌體的Me Wifi Module (毋須任何外部程式庫)
  • 上傳資料至thingspeak.com
  • 從thingspeak.com下載資料
  • 觸發maker.ifttt.com事件
  • 從OpenWeatherMap讀取資料(不建議在mCore/Orion使用)

注意事項:

  • 只有已刷非Makeblock原廠韌體的Me Wifi Module才可使用本擴展
    • 本擴展基於AT version 0.9.2.2 指令集
    • 由於Me Wifi Module 使用的ESP8266晶片只有512 KB的flash memory,暫時無法更新到最新的韌體(需要1024KB)
    • 使用者可用USB到TTL轉接器來更新韌體
    • 使用者亦可從Makeblock HK購買已刷韌體的Me Wifi Module
  • 本擴展只能在mBlock的Arduino mode中使用
  • 本擴展將使用主控板上大量的SRAM,可能導致主控板不穩定(特別是mCore和Orion)
    • mCore/Orion/Uno : 共有2056 bytes的SRAM
      • 測試時可上傳八個變數(每個5位元組)(例子:12.34, 123.4, 12345)
      • 如使用額外的程式庫(如PM 2.5),可能會使僅有的記憶體更吃緊,導致無法預料和排除的錯誤
    • Auriga/MegaPi/Mega: 共有8192 bytes的SRAM
      • 測試時上傳了八個變數,採用Auriga。已達到thingspeak.com支援的上傳極限
  • 在上傳/下載資料前,請先在程式中加上『連接Wifi模組』的指令
  • 在接上Wifi模組後,請先用『連接到AP』指令接上網絡
  • 唯一驗證本擴展是否正常運作的方法,是從瀏覽器檢查資料有否上傳到指定平台
  • 在同一個程式中,IFTTT的積木可使用多於一次;但上傳到Thingspeak的積木只能使用一次!
    • 雖然我想不透為何一個程式要使用兩次上傳到Thingspeak的積木......
  • 本人無法保證本擴展的可靠性及表現。可能發生無法預料的錯誤(例如記憶體溢出/網絡連接問題)

Features:

  • Use AT commands to config your flashed Me Wifi Module (No external library needed)
  • Upload customized data to thingspeak.com
  • Download feed from thingspeak.com
  • Trigger IFTTT events through maker.ifttt.com
  • Get weather info from OpenWeatherMap.com (Suggested to use on Auriga only)

Points to note:

  • The Me Wifi Module used must be flashed with suitable firmware. Factory firmware will not work
    • Tested and built for AT version 0.9.2.2
    • Since the ESP8266 chip on Me Wifi Module has only 512 KB of flash memory, cannot use more up-to-date firmware
    • User may flash the firmware using a USB to TTL adapter
    • User can also use flashed Wifi Module in "IoT WiFi Module Set" sold by Makeblock HK
  • This extension only works on Arduino mode
  • This extension use quite a lot of memory, may leads to unstable performance (especially mBot and Orion)
    • mCore/Orion/Uno : 2056 bytes of SRAM
      • Tested with 8 variables (All successfully uploaded)
      • Have slight chance to fail if using additional libraries (e.g PM 2.5)
    • Auriga/MegaPi/Mega: 8192 bytes of SRAM
      • Tested with 8 variables, using Auriga
      • Reached the maximum number of field supported by thingspeak.com
  • You must use the block "attach Wifi module" in your code before uploading/downloading data
  • You must connect to AP before sending or getting any message through internet
  • The proper way to verify if this extension works is through desired web service (i.e. check if data uploaded to thingspeak.com / triggered event in IFTTT)
  • For IFTTT block, you may use more than once in a program. However, the Thingspeak block can only be used ONCE!
  • I have no guarantee on the performance and reliability of this extension. Unexpected behavior may occur (e.g. overflow, internet connection issue)