B4R Library Watch Dog Timer For ESP8266

For the ESP8266 watchdog, can be very simple to use.
B4X:
#Region Project Attributes
    #AutoFlushLogs: True
    #CheckArrayBounds: True
    #StackBufferSize: 300
#End Region

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 wdt As ESP8266WatchDogTimer
    Public tme1 As Timer
End Sub

Private Sub AppStart
    Serial1.Initialize(115200)
    Log("AppStart")
    wdt.WDT_Enable(wdt.TME_250MS)
    tme1.Initialize("tme1_Tick",150)
    tme1.Enabled=True
End Sub

Private Sub tme1_Tick
    wdt.WDT_Reset
End Sub
 

Attachments

  • rESP8266WatchDogTimer.zip
    1.8 KB · Views: 391
Top