I am total beginner in programming. I already start a small project by using raspberry PI connect to the car OBD port and reading the data to the wxpython GUI. The OBD library I was using from http://brendan-w.com/work/python-obd By using the instruction above, I could successful print living rpm data in the python shell line by line. Code is here:
import obd
import time
connection = obd.Async("/dev/rfcomm0") # same constructor as 'obd.OBD()'
cmd = obd.commands.RPM
connection.watch(cmd) # keep track of the RPM
connection.start() # start the async update loop
while(True):
response_rpm = connection.query(cmd).value
print(response_rpm) # non-blocking, returns immediately
time.sleep(0.01)
#obd.debug.console = True
After this, I created the GUI by using wxformbuilder and change to wxpython code. I test the GUI wxpython code in raspberry PI which was no problem. But after add my OBD library code into it and, the whole frame is not working The thing that I want to do is to using the staticText.SetLabel() to display the living data in a while loop. The Code after add OBD library is here :http://pastebin.com/4HYXn4cv after running this in the raspberry Pi I only got a gray frame and nothing work