Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public Serial1 As Serial
Public Testnr1() As Byte = "000000"
Public Testnr2() As Byte = "!!!!!!!!!!!!!!!!!!!!000000" 'The exclamation marks is not a typo. Same problem occurs with hyphens or letters too by the way. The amount is just for show, 1 or 20 doesn't matter.
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
Log("Testnr1: ", Testnr1)
Log("Testnr2: ", Testnr2)
For i = 0 To 5
Testnr1(i) = Rnd(48,57) 'Btw, how can I do a simple random 0-9 and assign as a character?
Testnr2(i+20) = Rnd(48,57) 'Tried several solutions but ended up with using ASCII. In this case it works, but in others it wouldn't.
Next
Log("Testnr1: ", Testnr1)
Log("Testnr2: ", Testnr2)
End Sub