Announcement

Collapse
No announcement yet.

Not able to save sensor data on the SD file.

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

  • Not able to save sensor data on the SD file.

    I am currently trying to save data onto the SD card. I was able to store a string "HELLO WORLD" onto the SD file. When I call a data and store it on the SD card, I receive a message on the text file that I don't understand.
    The attached file is a sample code that I created, and also contains result.
    Please help.
    Attached Files
    Last edited by Shurp; 16 October 2019, 05:52 PM.

  • #2
    Hi,

    Please have a look at this modified code. Instead of using Display.file_Write(), you could use Display.file_PutS() instead.
    _4DuinoTestText.ino

    Best regards,
    Sherwin

    Comment


    • #3
      Got it. Thank you

      Comment


      • sherwin4D
        sherwin4D commented
        Editing a comment
        Hi,

        Awesome. You're very much welcome!

        Kind regards,
        Sherwin

    • #4
      Everything has been working fine, and now I am back to saving data on SD card. How do I create a new file without erasing old file on SD card after 4Duino turns on.
      Thank in advance for your help.

      Comment


      • #5
        Hello,

        To create a new file without erasing the previous file on SD card:
        Code:
        handle := file_Open("filename.txt", 'w'); // Note: If a file is opened for write mode 'w', and the file already exists, the operation will fail.
        Please ensure that the file names are not the same. You may also check PICASO Serial Command Set Reference Manual page 100 for complete description of the function and modes.

        I hope this helps.

        Best regards,
        Sherwin

        Comment

        Working...
        X