Shop OBEX P1 Docs P2 Docs Learn Events
Repeat until cycle and if statement issue — Parallax Forums

Repeat until cycle and if statement issue

sopiksopik Posts: 2
edited 2011-04-05 09:30 in BASIC Stamp
Hello everybody!

Can you please help me with my problem? There is peace of code. On uart(2) are responses from GSM module. If response "K" is - then repeat cycle ends and main routine continue. But if K does't come routine repeat cycle never ends...
PUB AckOK

  t := cnt 
  repeat until (uart.rx(2)) == "K"                      'Wait for "K"
    if (cnt - t) > clkfreq * 10                         'If 10s is done, quit repeat cycle
      quit 


Thank you for help

BR

Vincenc
Sign In or Register to comment.