This video demonstrates how to use Object-Oriented Programming in LabVIEW.
LabVIEW supports class, encapsulation, inheritance and override.
本影片說展示如何在LabVIEW中使用物件導向程式設計。
LabVIEW支援類別、封裝、繼承與覆寫。
This video demonstrates how to use Object-Oriented Programming in LabVIEW.
LabVIEW supports class, encapsulation, inheritance and override.
本影片說展示如何在LabVIEW中使用物件導向程式設計。
LabVIEW支援類別、封裝、繼承與覆寫。
This is the example which shows how to use events of the mouse (down, move and up) to draw rectangle on the waveform graph.
You can learn how to use event structure, waveform graph property, picture function and bundle/ unboundle vi to implement this example.
這個範例說明如何使用滑鼠的事件,像是按下、移動與釋放去繪製長方形在在圖形控制向上。你可以學習如何使用事件結構、圖形控制的屬性、圖形功能以及bondle/unboundle vi來完成這個範例。
本篇是說明如何動態產生控制項,
一般的控制項寫法是在.xml檔中直接拉控制項在畫面上,
可以動態產生的控制項的好處是,可以動態產生,也就可以動態刪除,
這一個範例是將TextVIEW, EditText以及Button,用addView()動態置入LinearLayout中,
本來是預計要寫一個同時可以讀手機溫度和濕度感測器的程式,
不過卻沒想到手邊的手機卻沒有內建溫度與濕度感測器,
如果要確認手上的手機有沒有溫溼度感測器,
可以到Google Play下載Sensor Test的App,會顯示手機上有的感測器種類,
這一片篇介紹如何讀手機上的光感測器,
Android有關於環境感測器資料擷取,包含環境溫度、光、壓力、濕度,以及裝置溫度感測器,如下表所列:
Sensor | Sensor event data | Units of measure | Data description |
---|---|---|---|
TYPE_AMBIENT_TEMPERATURE |
event.values[0] |
°C | Ambient air temperature. |
TYPE_LIGHT |
event.values[0] |
lx | Illuminance. |
TYPE_PRESSURE |
event.values[0] |
hPa or mbar | Ambient air pressure. |
TYPE_RELATIVE_HUMIDITY |
event.values[0] |
% | Ambient relative humidity. |
TYPE_TEMPERATURE |
event.values[0] |
°C | Device temperature.1 |
1 Implementations vary from device to device. This sensor was deprecated in Android 4.0 (API Level 14).
以下為取得光感測器的Android code: