發表文章

[Python][Voice] Write NI DAQ Data to File 儲存NI DAQ的資料到檔案中

圖片
這個範例說明如何將NI DAQ卡擷取的資料寫入檔案中 This example introduce how to write data acquired from NI DAQ card to a file. 這裡有5個步驟: There are five steps: 1. Install nidaqmx package, Python can use this package to read analog signals from NI DAQ card. 2. Use Simulated NI DAQ Device to simulate NI DAQ device. 3. Use matplotlib to plot analog signals from NI DAQ device. 4. Use File open, write and close method to save a file. 5. Use "with open() as file" to save a file. This is a recommendation for file read and write in Python. #1. 安裝nidaqmx套件,使用Pythone讀取NI DAQ類比訊號。 #2. 使用Simulated NI DAQ Device模擬DAQ卡類比訊號。 #3. 使用matplotlib作互動模式顯示DAQ卡的類比資料。 #4. 使用file open, write, close寫入檔案。 #5. 使用with open() as file寫入檔案,自動呼叫close,(建議使用)。 import  nidaqmx import  matplotlib.pyplot  as  plt plt.ion()  i =  0 #file = open('daq_data.txt','a')  #用於追加資料 with   open ( ...

[Python][Voice] Read Analog Signals From NI DAQ Card從NI 資料擷取卡中讀取類比訊號

圖片
This example provides the following three steps for training: 1. Install nidaqmx package, Python can use this package to read analog signals from NI DAQ card. 2. Use Simulated NI DAQ Device to simulate NI DAQ device. 3. Use matplotlib to plot analog signals from NI DAQ device. 這個範例提供以下三個步驟供練習: #1. 安裝nidaqmx套件,使用Pythone讀取NI DAQ類比訊號 #2. 使用Simulated NI DAQ Device模擬DAQ卡類比訊號 #3. 使用matplotlib作互動模式顯示DAQ卡的類比資料 import  nidaqmx import  matplotlib.pyplot  as  plt plt.ion()  i =  0 with  nidaqmx.Task()  as  task:     task.ai_channels.add_ai_voltage_chan( "Dev1/ai0:1" )      while  i <  100 :         aiData = task.read()         plt.scatter(i,aiData[ 0 ], c = "r" )         plt.scatter(i,aiData[ 1 ], ...

[LabVIEW][Voice]First Actor Framework Program-Hello World (一)第一支操作者框架程式Hello World(一)

圖片
This example demonstrates how to build an actor framework project, create actor and message class, and launch actor to call message method. 這的範例展示了如何建立操作者框架專案,建立操作者與訊息類別,以及啟動操作者去呼叫訊息的方法。 The launch.vi uses old approach of Lauch Actor.vi before LabVIEW 2014. The new approach will use Launch Root Actor.vi. 在launch.vi中使用的是LabVIEW 2014年前所使用的Launch Actor.vi. 新的方法為使用Launch Root Actor.vi。 If you want use Launch Root Actor.vi in LabVIEW 2012, you can try the method in the following website:  AF Experiment - Launch Root Actor and Launch Nested Actor 如果想在LabVIEW 2012使用Launch Root Actor.vi ,可以試試下列連結的方法:  AF Experiment - Launch Root Actor and Launch Nested Actor We will share more tutorial videos with people who want to learn LabVIEW and Python welcome to subscribe this channel. 未來會陸續更新影片,讓想學習LabVIEW和Python的朋友可以看影片學習,歡迎訂閱此頻道。 其他網址/related websites: https://labview-tech.blogspot.com/ https://fishark.pixnet.net/blog email: jacklee3633 @gmail.com Line: lvnet

[Micropython][Voice]Download ESP32 micropython firmware by using ESP32 download tool 燒錄韌體到ESP32開發版

圖片
This video shows how to download micropython firmware to ESP32 DevKitC v4 by using ESP32 download tool. 本影片說明如何使用ESP32 download tool將Micropython韌體燒錄在ESP32 DevKitC v4開發版上。 There are two steps: 1. Download Micropython firmware of ESP32 from micropython.org website. 2. Use ESP32 download tool to download Micropython firmware to ESP32 DevKitC v4. 有兩個步驟: 1. 從micropyhon.org下載ESP32的韌體。 2. 使用 ESP32 download tool將Micropython韌體燒錄在ESP32 DevKitC v4開發版。 We will share more tutorial videos with people who want to learn LabVIEW and Python welcome to subscribe this channel. 未來會陸續更新影片,讓想學習LabVIEW和Python的朋友可以看影片學習,歡迎訂閱此頻道。 其他網址/related websites: https://labview-tech.blogspot.com/ https://fishark.pixnet.net/blog email: jacklee3633@gmail.com Line: lvnet

[Micropython][Voice]Erase ESP32 flash by using ESP32 download tool清除ESP32的快閃記憶體

圖片
This video shows how to use ESP32 download tool to erase the flash on ESP32 DevKitC v4. 這支影片說明如何使用ESP32 download tool清除ESP32 DevKitC v4開發版上的快閃記憶體。 I think ESP32 download tool is one of easiest method of erasing the flash of ESP32 development board in Windows. Just press one button and without inputting any command. 我認為 ESP32 download tool 史最容易清除ESP32開發版的方法之一,只要按下一個按鍵,而無須下任何指令。 We will share more tutorial videos with people who want to learn LabVIEW and Python welcome to subscribe this channel. 未來會陸續更新影片,讓想學習LabVIEW和Python的朋友可以看影片學習,歡迎訂閱此頻道。 其他網址/related websites: https://labview-tech.blogspot.com/ https://fishark.pixnet.net/blog email: jacklee3633 @gmail.com Line: lvnet

[MicroPython] [Voice] Use ESP32 DevkitC V4 to aquire signals of DHT11 sensor 使用ESP32 DevKitC V4開發版來讀取DHT11數位溫溼度感測器

圖片
This example shows how to use ESP32 DevKitC V4 to read temperature and humidity data from DHT11 sensor. 本範例說明如何使用ESP32 DevKitC V4來讀取DHT11數位溫溼度感測器的資料。 Import dht library and define the data pin in the pin of dht in main.py. 在main.py中,輸入dht函數庫,與定義data腳位在dht的函數中。 Than use print() to display and update temperature and humidity data with time interval of 2 sec. 使用print ()函數去顯示與更新 溫溼度的數值每兩秒 。   - 韌體 Firmware: Micropython - 硬體 Hardware: ESP32 DevKitC V4,DHT11 - 開發環境 IDE: Thonny - 程式語言 Language: Python - 作業系統 OS: Windows We will share more tutorial videos with people who want to learn LabVIEW and Python welcome to subscribe this channel. 未來會陸續更新影片,讓想學習LabVIEW和Python的朋友可以看影片學習,歡迎訂閱此頻道。 其他網址/related websites: https://labview-tech.blogspot.com/ https://fishark.pixnet.net/blog email: jacklee3633 @gmail.com Line: lvnet

[Micropython][Voice] Use ESP32 DevKitC V4 to control RGB LED 使用ESP32 DevKitC V4開發版來控制RGB LED

圖片
This example shows how to use ESP32 DevKitC V4 to control RGB LED. 本範例說明如何使用ESP32 DevKitC V4來控制RGB LED。 Define Pin.OUT and use Pin.on()/off() function to turn on/off LED in main.py. 在main.py中定義Pin.OUT (Pin腳),使用Pin.on()/off()函數去開關LED。 - 韌體 Firmware: Micropython - 硬體 Hardware: ESP32 DevKitC V4 - 開發環境 IDE: Thonny - 程式語言 Language: Python We will share more tutorial videos with people who want to learn LabVIEW and Python welcome to subscribe this channel. 未來會陸續更新影片,讓想學習LabVIEW和Python的朋友可以看影片學習,歡迎訂閱此頻道。 其他網址/related websites: https://labview-tech.blogspot.com/ https://fishark.pixnet.net/blog email: jacklee3633@gmail.com Line: lvnet