Announcement

Collapse
No announcement yet.

microSD card writing / reading Goldelox

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • microSD card writing / reading Goldelox

    Hi All,

    I am here because I have not found any topic about microSD card writing and reading in a for example txt file. I would like to make a log function. I found application note for Diablo and Picasso and Arduino but not Goldelox.
    However Goldelox has internal commands to open, write etc but there is not application not or sample code to make it easier.

    So, do you have anyone from over mentioned? I am very appreciate that if someone would have something. I would like to write/read to/from a txt file in the SD card.

    Thanks for the help.
    Peter
    Last edited by peter.hanak; 21 January 2021, 12:27 AM.

  • #2
    Due to the limited RAM available on Goldelox, that becomes difficult, but certainly not impossible.

    You would use media_ReadByte() and media_WriteByte()

    For writing text you could also use to(MDA) ; print("Yarda, Yarda") ;

    All reading and writing would occur from the currently set media address, remember to use media_Flush() to ensure the last sector is written.
    Mark

    Comment


    • #3
      Hi Mark,

      Thank you very much for your very kind effort in my case. I am very appreciate it.

      I am not familiar in file writing/reading protocols, so this is quite new for me.

      As I am well understand that media read/WriteByte() commanf can reach the txt file which is in the SD card?
      I would like to write bytes to the sd card for example date, temperature data. It is not too much data flowing through memory.

      Could you please explaine in more detail how's work the print commanf in this sepcial case?
      How do I know what is the last address where can I write?

      If you maybe have an example program code I would be happy to sharing with me and maybe this can help other fellow 4D System users.

      I am very sorry for this basic questions.

      Peter

      Comment


      • #4
        Hi Mark,

        I have started to looking for how can I use the to(MDA) and print function.

        How can I open the file? The file must to be in the raw partition?

        Peter

        Comment


        • #5
          On Goldelox there is no file system, it is only RAW, so you use media_SetAdd() or media_SetSector() to define the 'start' of the file
          Mark

          Comment


          • #6
            Hello Mark,

            Thank you very much for your kind help in my case. i understand the limitations of uOLED so I started to use a GEN4-IOD-24T module which can capable to red/write data to SD card and much more.

            Thx again.
            Peter

            Comment

            Working...
            X