yahnatan / pulseox

Scripts to read stats from a Massimo Rad 8 pulse oximeter and push to elasticsearch for visualization via grafana, etc
14 stars 3 forks source link

Python Script #1

Open playpianolikewoah opened 7 years ago

playpianolikewoah commented 7 years ago

I was able to get this working with the following python script

import serial, time

ser = serial.Serial('/dev/tty.usbserial-A105DB7J', 9600, parity=serial.PARITY_NONE)
print ser.name
while 1:
    ser.flush()
    ser.flushInput()
    ser.flushOutput()
    serial_line = ser.read(126)
    print serial_line
    time.sleep(1)

ser.close() # Only executes once the loop exits

The requirements.txt would be

pyserial==3.4

You need to install pyserial with pip install

nmenon commented 7 years ago

See https://github.com/nmenon/masimo-datacapture as well.