Skip to content

Commit

Permalink
Update main.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
KalbeAbbas committed Aug 10, 2020
1 parent 438758f commit 4f41b89
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,29 @@ namespace cw01 {
basic.pause(200)
serial.readString()

let loop_count = 0

do {
cw01_vars.res = serial.readString()
basic.pause(1000)
loop_count++

if(loop_count == 10)
break
} while (!cw01_vars.res.includes("WIFI CONNECTED"));

if (cw01_vars.res.includes("WIFI CONNECTED")) {
basic.showString("C")
basic.pause(2000)
basic.showString("")
cw01_vars.res = ""
} else {
}

if(loop_count == 10)
{
basic.showString("D")
basic.pause(2000)
basic.showString("")
}
}

Expand Down

0 comments on commit 4f41b89

Please sign in to comment.