Sub SendProfile
Log("SendProfile")
LoadProfileArray 'Put some info in for test
If Starter.BTConnectionState=True Then
For i=0 To Starter.TotalDays-1
For j = 0 To Starter.TotalSteps-1
Starter.SendArray(0) = 2 'Key for this data
Starter.SendArray(1) = i 'DayCount
Starter.SendArray(2) = Starter.Profile(i,j).data1
Starter.SendArray(3) = Starter.Profile(i,j).data2
Starter.SendArray(4) = Starter.Profile(i,j).data3
Log("i= "&i&" j="&j)
CallSub(Starter,"SendToESP32")
Sleep(100) '<------------------------
Next
Next
Else
MsgboxAsync("BT not Connected","Cannot Send")
End If
End Sub