發表文章

[Python] For Loop 迴圈練習

圖片
For Loop練習,使用Google colaboratory。 1. 定義一個List,print List中的值 2. 使用range函數來產生for loop的迴圈變數 3. 透過索引(range和len)來執行For Loop

[Python] 好用的Python編輯器-Google Colaboratory與Jupyter Notebook線上版

圖片
作為一個想學Python的初學者,想使用簡單可以花最少時間學習的介面,我發現Jupyter Notebook是不錯的工具,一般Jupyter Notebook是要安裝在電腦上,會需要經過一些設定的程序,但也有線上版本(如: https://jupyter.org/try )。 可以選Try Jupyter with Python試看看Jupyter Notebok的功能,   寫幾行程式試試用Python畫圖的功能, 現在用我想使用的Google colaboratory試看看,只要有Google的帳號就可以使用, 在Google  Drive上新增Colaboratory應用程式: 在Google Colaboratory上輸入同樣的Python code,可以呈現相同的效果, 而且這兩個線上應用軟體都可以下載成.py或.ipynb的檔案。 之後Python的程式練習也會在這兩個平台上進行。 使用線上版好處是只要有網路,在不同的電腦都可以進行python程式的練習。 Jupyter Notebook寫備註也很方便,可以看是一個可以寫程式的筆記本。

使用BLE Dongle (BLED112)與LabVIEW BLE Toolkt遭遇的問題

圖片
2018.02.25 目前想使用BLED112與LabVIEW BLE Toolkit與BLE M+Arduino作結合,想Read與Write資料, 雖然這個BLE Module與App Inventor 2的資料讀寫,已經證實可行, 但在與BLED112與LabVIEW BLE Toolkit的搭配上卻還有這一些問題, 首先是Characteristic UUID與Service UUID無法被發現: Error 0 occurred at Client Characteristic Configuration for Service: 0000FFF0-0000-1000-8000-00805f9b34fb and Characteristic 0000FFF1-0000-1000-8000-00805f9b34fb was not found 另一個可能是Notify沒被Enable, 有個論壇中的回覆是這樣描述的: I enabled notifications for the TI sensortag cc2650, sequence: 1. Write 0x01 to sensor configuration UUID to enable data collection [temperature sensor AA02, humidity sensor AA22, ...]. 2. Write 0x0100 to sensor notification UUID 2902. 3. Monitor the attribute value event [use ble_evt_attclient_attribute_value.vi in the above toolkit] 目前只能試到如此,之後在程式是否能解決上述問題,如無法解決,只好試試他BLE Module了。 2019.02.28 測試另一個可以讀到 Device Name的BLE模組,發現這個模組可以看到 Handle Table,而之前的BLE模組卻沒有Handle Table,這是要保留探討的部分。 我們暫時將可以抓到Handle Table的BLE模組稱為BLE.B,而原先的稱為BLE.A,以下是BLE.B的Handle Ta...

App Inventor 2 BLE 參考程式碼

最近搜尋的一下App Inventor在BLE方面的成是範例,發現增加了不少, 以下是可以參考的一些網頁: 1.  Reliable Bluetooth LE Comms Between Arduino and MIT App Inventor (AI2) https://arduinoplusplus.wordpress.com/2017/05/23/reliable-bluetooth-le-comms-between-arduino-and-mit-app-inventor-ai2/ 2.  BLE transfers using MIT App Inventor for Android http://www.limifrog.io/2017/05/ble-transfers-using-mit-app-inventor-for-android/ 3.  Arduino, HM-10 and App Inventor 2 http://www.martyncurrey.com/arduino-hm-10-and-app-inventor-2/

(下) BLE (Bluetooth Low Energy) Toolkit for LabVIEW (低功耗藍芽工具套件)

圖片
將LabVIEW更新到2014版後,新買的BLE Dongle也到貨了,接下來要完成LabVIEW BLE Toolkit的安裝,以及BLE Dongle Driver的安裝。 使用VIPM安裝完BLE Toolkit,接著按下Show Examples按鈕,      可選擇以下三個VI來測試,      ble_scan_devices.vi Discover and connect to BLE devices ble_read_write_characteristics.vi Read and Write a Characteristic value, providing the  UUID  for  Service  and  Characteristic ble_read_hr_monitor.vi  Acquire Heart Rate data stream, for devices with Heart Rate Profile 執行 ble_read_hr_monitor.vi,

LabVIEW傳輸資料到Google Spreadsheets Data

https://forums.ni.com/t5/LabVIEW/Google-spreadsheet-API/td-p/2683663 https://forums.ni.com/t5/Example-Programs/Simple-LabVIEW-Web-Browser/ta-p/3501835 https://forums.ni.com/t5/Example-Programs/Google-Spreadsheets-Data-API-Read/ta-p/3529839

(上) BLE (Bluetooth Low Energy) Toolkit for LabVIEW (低功耗藍芽工具套件)

圖片
之前使用過 App inventor開發過BLE App,但實在是有不方便的地方 例如Debug的部分, 最近翔從 LabVIE來實現與BLE的溝通,於是搜尋相關資訊,發現LabVIEW有提供相關的套件, 1. 下載資訊: Communicate with Bluetooth Low Energy (BLE) Devices in LabVIEW https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LuHSAU 2. 低功耗藍芽工具套件下載處 BLE-Toolkit-LabVIEWriu https://github.com/MuSAELab/BLE-Toolkit-LabVIEW 3. 使用VIPM安裝 套件內容: BLE Toolkit v1.4.0.2 by MuSAE Lab Author: Raymundo Cassani Copyright: Copyright (c) 2017, MuSAE Lab License: MIT Compatible LabVIEW Versions: >= 2013. Compatible OS Versions: ALL. Description: The BLE (Bluetooth Low Energy) toolkit allows the interaction of BLE devices with LabVIEW. The BLE toolkit for LabVIEW is an implementation of the Bluegica BGAPI, that allows to communicate with Bluegiga BLE(D)11x and WF121 devices using USB/UART. Provided examples indlude: * Scanning for BLE devices * Reading and Writing Characteristics values * Acquiring Heart Rate data stream 由於目前使用的LabVIEW版本太舊,需要更新, ...

Labview 藍芽 bluetooth 應用程式發展

1. NI網站-使用LabVIEW發展藍芽應用程式: Developing Bluetooth Applications with LabVIEW http://zone.ni.com/devzone/cda/tut/p/id/3260 2. NI網站-使用LabVIEW發展藍芽應用程式影片: Develop Bluetooth Applications with LabVIEW http://sine.ni.com/apps/we/nievn.ni?action=display_offerings_by_event&event_id=14397&event_subtype=WEB_EVENT_DEMAND&site=NIC&l=US

Labview 線上教學課程

1. LabVIEW Introduction Course - Six Hours http://zone.ni.com/devzone/cda/tut/p/id/5241 2. LabVIEW Introduction Course - Three Hours http://zone.ni.com/devzone/cda/tut/p/id/5243 3. Learn LabVIEW 8 in 3 hours http://zone.ni.com/devzone/cda/tut/p/id/5247

自動控制理論

1. 南台科技大學電機科的進修網站: 控制理論簡介 http://elearning.stut.edu.tw/mechelec/mechelec_1.htm 2. 基本的Transfer funciotn的計算介紹: Using transfer functions for calculations http://www.atp.ruhr-uni-bochum.de/rt1/syscontrol/node19.html 3. 使用Matlab解決用PID控制倒垂鐘擺的問題: Solution to the Inverted Pendulum Problem Using PID Control http://www.engin.umich.edu/group/ctm/examples/pend/invPID.html#ol

Temperature Control 溫度控制

1. 回授溫度控制原理及機電設計: Feedback and Temperature Control http://newton.ex.ac.uk/teaching/CDHW/Feedback/ 2. 介紹溫度控制器的原理及機電設計的基本架構: Introduction to Temperature Controllers http://www.omega.com/prodinfo/temperaturecontrollers.html

PID 控制

1. PID演算法: The PID Algorithm http://www.jashaw.com/pid.html 2. PID算法及參數調控方法: PID ALGORITHM andTUNING METHODS http://www.jashaw.com/pid/tutorial/ 3. 封閉迴圈控制介紹: Introduction to Closed-Loop Control http://www.netrino.com/Publications/Glossary/PID.php 4. Wiki百科: PID控制器 http://zh.wikipedia.org/wiki/PID%E6%8E%A7%E5%88%B6%E5%99%A8

Matlab之PID控制

使用Matlab寫PID控制程式, 含程式碼: Control tutorials for Matlab-PID Tutorial http://www.engin.umich.edu/group/ctm/PID/PID.html

Mathscript : Labview 與 Matlab 的結合

1. 中央大學的一個關於Matlab的網站: BCC16 Matlab 線上教材 http://libai.math.ncu.edu.tw/bcc16/B/matlab/ 2. 倫敦大學的Matlab線上教材 Interactive MATLAB CourseDepartment of EngineeringQueen Mary, University of London http://www.imc.tue.nl/intmatlab/inhouden.htm 3. 一個寫作Labview部落格 Labview MathScript: 在MathScript Window中實現 Plot繪圖功能 http://blog.pixnet.net/fishark/post/2198247 4. NI LabVIEW MathScript 範例 NI LabVIEW MathScript Example Gallery http://zone.ni.com/devzone/cda/tut/p/id/3572 5. NI LabVIEW MathScript 範例 NI Multimedia Demonstrations of LabVIEW MathScript http://zone.ni.com/devzone/cda/tut/p/id/3660

Labview擷取Webcam影像

1. 私人寫的Labview webcam工具: LabVIEW Webcam Library http://www.cs.unc.edu/~parente/labview/index.shtml 2. NI提供的關於USB Camera工具: NI-IMAQ for USB Cameras http://sine.ni.com/devzone/cda/epd/p/id/5030 3. 關於Labview擷取webcam影像說明: 使用 labview擷取webcam影像並存成AVI檔 http://labview.net.googlepages.com/labviewwebcamavi

使用Labview與PDA作資料擷取

1. 下載resource kit, 幫助使用Labview PDA Module來發展可攜式系統: Portable Data Acquisition Resource Kit http://digital.ni.com/express.nsf/bycode/ex2f5n 2. 使用LabVIEW PDA Module and Juniper Systems Allegro CX 發展可攜式量測儀器: Build Rugged Mobile Test Instruments using LabVIEW PDA and the Allegro CX http://zone.ni.com/devzone/cda/tut/p/id/3053 3. NI 提供PDA發展資料擷取的產品及相關發展工具: 如何在PDA上進行資料擷取? http://digital.ni.com/public.nsf/allkb/18B0F2990092C6B3862571B200108EBA 4. PDA的介面卡, 用來做資料擷取: DAQ Compact Flash Card http://www.hacker-technology.com/3479/3525.html?gclid=CIe5huv7tYoCFRU9bgodBVypvg

Labview 與 MSQL 資料庫的連結

1. NI Knowledge Base看到的文章, 內容描述MySQL提供Labview的toolkit, 來幫助Labview與MySQl作連結: Using MySQL with the Database Connectivity Toolkit on Windows http://digital.ni.com/public.nsf/allkb/47A8CF66D5E3C8CC8625720A006139D6 2. 是描述如何利用Labview與PHP語言來語MySQL作連結: MySQL SDK For LabVIEW Tutorial http://inventeering.com/MySQL_SDK_For_LabVIEW/introduction.htm