B4R Library Watch Dog Timer For ESP8266

Discussion in 'B4R Libraries' started by santook, May 3, 2019.

  1. santook

    santook Member

    For the ESP8266 watchdog, can be very simple to use.
    Code:
    #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
     

    Attached Files:

    Johan Schoeman and kolbe like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice