Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:54 21 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : APPEND to a file on SD card fails on 5.070606

Author Message
k2backhoe
Regular Member

Joined: 04/12/2021
Location: United States
Posts: 47
Posted: 01:45am 31 Dec 2022
Copy link to clipboard 
Print this post

PicoMiteV5.07.05b17 would respond to

Open "battemptst.txt" For append As #1  
Print #1, prstr$
Close #1

by appending data to form files on my micro-SD card like

...
30-12-2022 20:16:02 Batt= 4.028,PicoTemp= 68.87, T0=1832.00, T1=1832.00, T2=1832.00
30-12-2022 20:17:02 Batt= 4.028,PicoTemp= 68.87, T0=1832.00, T1=1832.00, T2=1832.00
30-12-2022 20:18:02 Batt= 4.029,PicoTemp= 68.87, T0=1832.00, T1=1832.00, T2=1832.00
30-12-2022 20:19:02 Batt= 4.027,PicoTemp= 68.87, T0=1832.00, T1=1832.00, T2=1832.00
30-12-2022 20:20:02 Batt= 4.028,PicoTemp= 69.71, T0=1832.00, T1=1832.00, T2=1832.00
30-12-2022 20:21:02 Batt= 4.028,PicoTemp= 69.71, T0=1832.00, T1=1832.00, T2=1832.00
30-12-2022 20:22:02 Batt= 4.027,PicoTemp= 69.71, T0=1832.00, T1=1832.00, T2=1832.00
30-12-2022 20:23:02 Batt= 4.028,PicoTemp= 69.71, T0=1832.00, T1=1832.00, T2=1832.00
30-12-2022 20:24:02 Batt= 4.028,PicoTemp= 69.71, T0=1832.00, T1=1832.00, T2=1832.00
30-12-2022 20:25:02 Batt= 4.028,PicoTemp= 68.87, T0=1832.00, T1=1832.00, T2=1832.00
...

but using 5.070606 the entire file on the SD card is just the last like written:

30-12-2022 20:25:02 Batt= 4.028,PicoTemp= 68.87, T0=1832.00, T1=1832.00, T2=1832.00

as if the file were erased and re-opened from scratch, or overwritten from the start instead of appended.  I demonstrated this on two different Pico circuits.

I assume this is a side effect of the new file system.  Is there a workaround, or shall I go back to V5.07.05b17 permanently or until an update occurs?

Is there a version of the updated manual where such things are documented?

Thanks in advance for any answers  (PS: I really liked 5.070606 because it fixed the leading LED color error that 5.0705 had with the WS2812B strings)
 
k2backhoe
Regular Member

Joined: 04/12/2021
Location: United States
Posts: 47
Posted: 02:14am 31 Dec 2022
Copy link to clipboard 
Print this post

Temporary fix attained. The wisdom of keeping a legacy folder of all the past versions I have downloaded.  Version 5.07.05RC9 works properly (4 trials and errors) on "open for append" and also works properly to load colors into the WS2812B.  I will use this until I understand how to properly append data to files in the new system.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10629
Posted: 08:12am 31 Dec 2022
Copy link to clipboard 
Print this post

Are you setting the active drive to be the SDcard?




Drive "b:"
Kill "test.txt"
For i=1 To 10
Open "test.txt" For append As #1
Print #1,"hello "+Str$(i)
Close #1
Next
List "test.txt"


works perfectly for me on the SDcard. There does seem to be a bug on using append with the flash file system that I need to look at.
Edited 2022-12-31 18:46 by matherp
 
k2backhoe
Regular Member

Joined: 04/12/2021
Location: United States
Posts: 47
Posted: 10:11pm 01 Jan 2023
Copy link to clipboard 
Print this post

Well, of course.  Now that there are two potential drives,I have to specify which one.  Thanks, that makes total sense.

The post labeled "PicoMite V5.07.06 preview - flash file system": this is the current documentation I should look at for any information about the new flash file system and any changes to the old SD file system?  I hate to keep taking up peoples time with things I should learn from existing documentation.

Thanks again for this wonderful system.  I am working on the final iteration of a flexible data collection board based on the Pico and Basic, and having a marvelous time.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025