sparkfun/OpenScale

How to get scale readings (preferably in Python)?

Closed this issue · 1 comments

I've got a load cell hooked up to my openscale which in turn is connected to my Raspberry Pi, and I'm trying to get some readings. After ssh'ing into my raspi I load up the openscale menu like this:

screen /dev/ttyUSB0 9600

I got to the menu, followed the instructions to tar to zero and calibrate it. But from here I'm kinda lost in getting results. I can go into calibration mode again and see results, but how do I get readings outside the calibration menu? And more importantly; how do I get results into Python?

Can anybody give me some hints in the right direction?

For future readers: in the end I used pyserial to get the readings like this:

import serial
with serial.Serial('/dev/ttyUSB0', timeout=1) as ser:
    while True:
        line = ser.readline()
        print line