0

I'm writing a python program in openWRT for arduino (dragino + mega adk), first my code is OK in linux console, but when I use it in Arduino, with runShellCommand, it didn't work. I realized the error is in the while loop(doing some tests), so please can you help me? Where is the error?

It seems to be in brigde.py(to connect arduino with linux)..... but what can I do?

some of the code...

while fr==0:

respuesta = some wsdl request
    try:
        codigo= respuesta.somethingIGet
        print codigo
    except:
        codigo = '0N0E'
        print codigo
    time.sleep(1) #pause 1 second

I kill the process using the PID, to get out the while loop....

Jahid
  • 21,542
  • 10
  • 90
  • 108
  • Indentation maybe? I think the contents of the while loop are supposed to be indented. (starting at `respuesta = some wsdl request`) – whyalex May 18 '15 at 07:07

1 Answers1

0

Solved! I think some goes wrong with the bridge, so I disabled it to make a CLEAN serial connection between arduino(ath0) and dragino module (both make an arduino yun), then I execute this python program at startup, adding this to the init files in /etc. Is an easy way to use LUCI panel (dragino's visual interface) in System tab-->startup; And in arduino I only do a serial connection at 9600bps, So It works fine at the moment.