Sub Process_Globals
Public Serial1 As Serial
Private net As Ethernet
Private MacAdress() As Byte= Array As Byte(0xAA, 0xBA, 0xCA, 0xDA, 0xEA, 0xF0) ' i forgot about that
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
CallSubPlus("netConnect", 0, 0)
Log("AppStart")
End Sub
Sub netConnect(tag As Byte)
If net.InitializeDHCP(MacAdress) = False Then
Log("Error connecting to network.")
CallSubPlus("netConnect", 1000, 0)
Return
Else
Log("Connected to network. My ip address: ", net.LocalIp)
End If
'...
End Sub