private async void reset() { string ReadData; bool WhileLoopSwitch = true; //Disable All button DisableAllButton(); //Send a char to bluetooth dw.WriteByte(H); TestBlock.Text = "Home buttom Click"; await dw.StoreAsync(); while (WhileLoopSwitch) { //wait until recieving a singal from bluetooth ReadData = (await readLine(input)); if (ReadData.Equals("Done")) { Signal = 0; UserSpeed = 0; //Able All button again EnableAllButton(); WhileLoopSwitch = false; Step_TextBox.Text = "" + 1; } } }