2015年8月28日 星期五

Node.js with Windows 10 IoT on Raspberry Pi 2

繼續Pi的Windows 10 IoT奇幻旅程,試做Node.js的學習。Follow一些網頁的作法,遇到不少問題,不過,總算是有搞定,做個記錄先。

PC環境設置

  • Install the latest Node.js Tools for Windows IoT from here.
  • Install Python 2.7.


  • Copy Node.js to Pi
    官網是用PowerShell指令操作,有點複雜搞不定,其實用"檔案總管"就可以了。
    將PC上安裝好的Node.js複製到Pi上,再置換node.exe為ARM版本的就好了。



    Build Addon - MemoryStatus
    這程式主要是 node.js 呼叫取得系統中記憶體狀態,需要用到Python 2.7來build.


    Copy Node.js Apps to Pi
    把node.js的執行程式Server.js,和上個步驟所build出來的MemoryStatusAddon.node,copy到Pi。


    Run Node.js App
    這部份就要用PowerShell連到Pi來操作,設定好firewall rule後,就可以執行了。
    用browser連連看…有出現就成功了
    Pi中有Node.js的行程,按X就就可結束

    Reference:
    http://ms-iot.github.io/content/en-US/win10/samples/Nodejs.htm
    http://blogs.windows.com/buildingapps/2015/05/12/bringing-node-js-to-windows-10-iot-core/
    http://ms-iot.github.io/content/en-US/win10/samples/Nodejs.htm
    https://github.com/ms-iot/ntvsiot/releases

    2015年8月26日 星期三

    Raspberry Pi 2 for Windows IoT Core

    Raspberry Pi 2 上跑 Windows IoT Core


    使用Browser連入Pi 2,有相關的裝置資訊和管理介面
    程式App的執行與結束也可透過Web介面管理

    這就像Windows工作管理員一般,顯示執行中的行程
    CPU效能也可在Web上呈現
    也有裝置管理員…cool
    基本網路設定是一定有的,還有藍芽設定
    趕快寫個程式來測試一下,最近剛在做Digital Signage,就用VS 2015寫個Web Browser來連連看