I just work with my Raspberry Pi with a log-file which is updated each minute. Could someone help me with the code to read the content of the file and search for the right value in it? Furthermore, I should save the data which are read in a database.
Thank you very much.
To read a file, use FolderItem
To save values into a db, use the Database Class
What database do you want to use?
Yo can use InStr to search for a string.
Thx for your help Albin!
But how can I convert the FolderItem to a string? Because in the “temp1.txt” file is the word “temperature” stored and after it is a unknown value which I have to read and store in the table.
I think I will use a MySQL database.
Here is me current code:
dim s as string
dim f as FolderItem
Look at TextInputStream in the documentation.