2017/061 python simple test script for PMS7003 dust sensor #!/usr/bin/python # -*- coding: utf-8 -*- ''' Read outputs of PMS7003 particle sensor via USB2UART. Print out results on screen. https://irmus.tistory.com/ irmusy@gmail.com ''' import serial import struct COM_PORT = 'COM7' # index of list PMS7003_FRAME_LENGTH = 0 PMS7003_PM1P0 = 1 PMS7003_PM2P5 = 2 PMS7003_PM10P0 = 3 PMS7003_PM1P0_ATM = 4 PMS7003_PM2P5_ATM = 5 PMS7003_PM10P0_ATM = 6 PMS7003_PCNT.. 2017. 6. 14. 이전 1 다음