0

I'm using Raspberry Pi3 under Rasbian OS. My goal is to connect the RPi USB to the FTDI and send serial write command to the FTDI using Python:

import serial, time

ser = serial.Serial('/dev/ttyACM0', 9600)
while True:
    data = ser.readline()
    print(data)
    time.sleep(1)

But no data displayed?

And so does the write command no data out?

2

My goal is to connect the raspberry pi3 USB to the FTDI and send serial write command

I don't use python but I guarantee this is a read, not a write:

while True:
    data = ser.readline()
    print(data)

Unless whatever is on the other end of the FTDI cable is sending data to the pi then this will do nothing but wait for something that never happens.

1

First of all, your FTDI chip is probably mounted under /dev/ttyUSBx, not ttyACM0.

Second, writing is done using serial.write(buffer) function. If you want to test communication with the FTDI chip itself (whether UART works or not), connect a jumper across TX and RX pins of the module you have. This will print out anything you send to chip

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.