## DLP6500使用python 控制教學 到以下網站 https://github.com/csi-dcsc/Pycrafter6500 下載zip檔並以vscode開啟  裝 `pip install usb` `pip install pyusb` 下載並裝 https://sourceforge.net/projects/libusb-win32/ 裝完後會自動開啟  按下Next 會到這個頁面,有許多hardware,插拔電腦上裝的usb裝置後可以發現,上面內容會改變,一直插拔DLP的usb,觀察哪些是DLP的,然後將那些選擇並按下下面的install  範例程式中引入三個函示庫  需先至CMD輸入以下程式安裝函示庫 ``` pip install numpy //安裝numpy pip install Pillow //安裝PIL //pycrafter6500在github壓縮檔中,需手動引入 ``` 將範例code的讀圖片改成下面這種寫法(絕對路徑)。  右鍵範例code,直接run應該可以發現DLP6500的圖變成貓咪  如下  images: python list of numpy arrays, with size (1080,1920), dtype uint8, and filled with binary values (1 and 0 only) 表示使用此函示庫圖片格式限制為png、tif或tiff檔 尺寸 1920*1080 解析度 96dpi 位元深度 8 先指令DLP stopsequence  選擇DLP模式,這裡我們選取 mode(3)  **mode=0** 為影片模式(video mode),可做第二螢幕 **mode=1** 預存圖像模式(pre stored pattern mode),DLPC900可以存 400 個 1-bit 圖像. 8-bit可以存 50 個圖像 **mode=2** 表示視訊影像模式(video pattern mode),將圖像嵌入到HDMI中,然後透過視訊圖像模式顯示它們 **mode=3** 表示動態模式(pattern on the fly mode) 接下來設定參數  **exposures**:**曝光時間**,以**us**為單位,python list or numpy array,長度必須等於images list **dark time**: 曝光後**黑暗時間**,以**us**為單位,python list or numpy array,長度必須等於images list **trigger in**: python list or numpy array of boolean values,長度必須等於images list,確定在曝光之前是否等待外部觸發。 **trigger out**:python list or numpy array of boolean values,長度必須等於images list,確定在曝光之後是否發出外部觸發。 ``` controller.defsequence(images,exposures,trigger in,dark time,trigger out, repetitions) ```  **repetitions**: 重複次數,設定為 0 表示無限循環。 指令DLP startsequence  GUI:https://www.ti.com/tool/DLPC900REF-SW  for any problem email : srlin@ntumems.net ###### tags: `DLP6500` `python` `optic`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up