Code สำหรับใช้ในการเรียนการสอนในโครงการการประยุกต์ใช้จริงของเทคโนโลยีไอโอทีสำหรับภาคอุตสาหกรรม (Industrial Internet of Things: IIoT) ร่วมกับระบบฝังตัว (Embedded System) เทคโนโลยีความจริงเสริม (Augmented Reality: AR) และคอมพิวเตอร์วิชั่น (Computer Vision)
- Windows 10
- Spout for Python [link] (แนบไฟล์
SpoutSDK.pyd
มาให้แล้ว) - Miniconda3 Windows 64-bit [link]
- Python 3.5 (Virtual Environment) [link]
- opencv-contrib-python
- pyopengl
- pygame
- Python 3.5 (Virtual Environment) [link]
- สร้าง Device ประเภท
Paire
จำนวน 2 Device และตั้งค่าดังนี้COM1 <=> COM2
COM3 <=> COM4
- เปิดใช้งาน
FIBO Plant Simulator 2020.exe
- ตั้งค่า Resolution =
1920x1080
(สามารถเปลี่ยน Resolution ได้) - เปิดใช้งาน Serial Port ที่
COM4
- ตั้งค่า Resolution ใน Code ให้ตรงตาม Plant Simulation
- สำหรับเครื่องที่ใช้ CPU ที่มี APU ต้องทำการตั้งค่าให้ Python ใช้งาน GPU ในการ Redner ดังนี้
- Nvidia GPU
- เปิดโปรแกรม NVIDIA Control Panel
- Manage 3D Setting -> Program Settings
1. Select a program to customize:
= python.exe2. Select the preferred graphics processor for this program:
= High-performance NVIDIA processor
- AMD GPU
- ?
- Nvidia GPU
- เปิดใช้งาน
ArduinoSimulatorV0.12.1.exe
- กดปุ่ม
Run
เพื่อเริ่มการทำงาน - โปรแกรมจะเริ่มเชื่อมต่อกับ Plant Simulation และ Automation System ผ่าน
COM3
และCOM1
- โปรแกรมจะทำการอ่าน Code จาก
./arduino/default/default.ino