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
Type Box (x As Int, y As Int, z As Int)
Dim x, y, z As Box
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
End Sub
Sub BoxVolume(bx As Box) As Double
Return bx.x * bx.y * bx.z
End Sub
Sub BoxEnlarge(bx As Box)
bx.x = bx.x*2
bx.y = bx.y*2
bx.z = bx.z*2
End Sub