Go Down

Topic: Confusing response with APC220 (Read 764 times) previous topic - next topic

alfiesty

I have an Arduino with a temperature module and an APC220 rf module attached. I have another APC220 connected to my PC through a USB/serial converter on Com 7. If I point the serial monitor to Com 7, I see the temperature displayed continuously. I have tried three terminal emulators (Putty, Indigo, and Realterm), pointed them to Com 7 and see no data. I know they are looking at Com 7 because if I point the Arduino IDE terminal to 7 then try to use the others I get the message "Com 7 in use". What I am trying to do is monitor the  signal to make sure it is still working, while programming another Arduino with an APC220 and a LCD, which I have so far not been able to  display the data on. What is different about the IDE's terminal? I am using 9600 baud, no parity everywhere.
Jim
8000ft above the average

alfiesty

Having not received any responses, I found a way to work around this issue.
jim
8000ft above the average

trol188

Hello,
I have been all day looking for the answer !
This is how to solve the problem reading serial data with the APC220 from python :

import serial # pyserial 2.7

ser = serial.Serial()
ser.port = "COM5"
#ser.port = "/dev/ttyS2"
ser.baudrate = 9600
ser.bytesize = serial.EIGHTBITS #number of bits per bytes
ser.parity = serial.PARITY_NONE #set parity check: no parity
ser.stopbits = serial.STOPBITS_ONE #number of stop bits
ser.timeout = 0             #non-block read
ser.xonxoff = False     #disable software flow control
ser.rtscts = False     #disable hardware (RTS/CTS) flow control
ser.dsrdtr = False       #disable hardware (DSR/DTR) flow control

ser.setRTS(0)  #  <---- THIS SOLVED THE PROBLEM READING SERIAL DATA WITH APC220
...

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy