I am new at programming and am trying to communicate with my vehicle with an OBD II device. Serial to USB. I've done what I want it to do but I get the command I entered to print out. How do I just get the information from the device?
Heres my code. I am using Python 3.2.3
import serial
import time
import string
import io
import os
import sys
ser = serial.Serial("/dev/ttyUSB1")
ser.baudrate = 38400
s = input('Enter AT command --> ')
print ('AT command = ' + s)
ser.write(bytes(s + '\r\n', encoding = 'utf-8'))
ser.timeout = 1
response = ser.read(999).decode('utf-8')
print(response)
ser.close()
And here is what prints out when I enter the command 'atrv'.
>>>
Enter AT command --> atrv
AT command = atrv
atrv
0.1V
>>>
How do I prevent the 'atrv' above the 0.1V from printing out?