0

This is my first time playing around with serial communication and I am struggling with getting any data from my scale. The scale did not come with any of the serial settings needed for configuring and the instructions for printing are lackluster at best. When I run my python script, all I get in return is "b''". Here is my script below:

import time
import serial

# Configure the serial connection
ser = serial.Serial(
    port='/dev/ttyAMA0',  # Use the built-in UART port
    baudrate=9600,
    parity=serial.PARITY_NONE,
    stopbits=serial.STOPBITS_ONE,
    bytesize=serial.EIGHTBITS,
    timeout=1
)

while 1:
    x=ser.readline()
    print(x)

Here is a link to the user manual of the scale

Her is a link to the converter

I have tried alternating the vcc cable from 3.3 to 5v, but nothing changes. I have tried testing with minicom, but minicom is unresponsive. I cannot enter any commands into it, including the helper bar.

  • "*I have tried alternating the vcc cable from 3.3 to 5v*" -- That's the wrong kind of experimentation to try, as you could cause circuit damage. Read the docs or use a voltmeter. You neglect to describe any other connections. You probably need to use an oscilloscope to verify whether the RX & TX pins of the converter are input & output or output & input. Or follow the circuit traces, and look up the MAX3232 pin out. – sawdust Mar 26 '23 at 22:06

0 Answers0