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?

asked Sep 21, 2016 at 13:02
0

2 Answers 2

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.

answered Sep 22, 2016 at 16:16
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

answered Mar 22, 2019 at 9:06

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.