#Region Project Attributes
#AutoFlushLogs: True
#CheckArrayBounds: True
#StackBufferSize: 300
' #DefineExtra: #define B4R_MEMORY_ALIGNMENT 3
#DefineExtra: #define SKIP_B4RNEW
#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
Private fs As ESP8266FileSystem
Private timer1 As Timer
End Sub
Private Sub AppStart
Serial1.Initialize(9600)
Log("AppStart")
fs.Initialize
timer1.Initialize("fs_loop",1000)
timer1.Enabled=True
End Sub
Sub fs_loop
Log(" Stack: ",StackBufferUsage," RAM: ",AvailableRAM)
For Each f As File In fs.ListFiles("/")
Log("Name: ", f.Name, ", Size: ", f.Size)
Next
End Sub