Sub Process_Globals
Public Serial1 As Serial
Private wifi As ESP8266WiFi
Private rfid As MFRC522
Private bc As ByteConverter
Dim d1 As D1Pins
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
'example of connecting to a local network
'If wifi.Connect2("SSID", "PASSWORD") Then
' Log("Connected to network")
'Else
' Log("Failed to connect to network")
' End If
rfid.Initialize(d1.D3, d1.D4, "rfid_CardPresent")
rfid.LogVersion
End Sub
Sub rfid_CardPresent (UID() As Byte, CardType As Byte)
Log("UID: ", bc.HexFromBytes(UID))
End Sub