B4R Question Log in ESP8266

tonga

Member
Licensed User
Longtime User
Hi,
I wish to log the various states of I/O and analog input of ESP8266 and save in a file internally the flash of that esp, for an interval of time.
How can I do?

Thanks
 

tonga

Member
Licensed User
Longtime User
Yes, I saw and used that link, but what I can not do is add the data read from the peripherals of the ESP to one of those files
 
Upvote 0

tonga

Member
Licensed User
Longtime User
I read the input and output values of the pins that interest me. The same for the analog value of the ADC converter. Then I think of putting these data together and adding them to the file
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4X:
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
End Sub

Private Sub AppStart
   Serial1.Initialize(115200)
   Log("AppStart")
   Log(fs.Initialize)
   Log(fs.OpenReadWrite("test"))
   Dim b() As Byte = Array As Byte(0x33, 0x55)
   fs.Stream.WriteBytes(b, 0, b.Length)
   fs.Close
End Sub
 
Upvote 0

tonga

Member
Licensed User
Longtime User
There is in B4r an method equivalent to mode "a" or "a+" of "SPIFFS.open(path, mode)", of Arduino file system, to append?
 
Upvote 0
Top