Announcement

Collapse
No announcement yet.

Write Setting to SD card and Set Initial Screen based on that setting

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

  • Write Setting to SD card and Set Initial Screen based on that setting

    Hi there,

    Perhaps this is two distinct questions, but they are related so I'll just put them in one post.

    I want to save a configuration setting to the SD card based on a radio-button type selection. On startup I'd like to read that setting from the SD card, and activate a specific form depending on what the saved setting is. I'm not sure how to do the actual reading and writing to/from the sd card. Or if this is even possible.

    Thanks,

    Mike

  • #2
    Hello Mike,

    I've created a sample project to address your query, which I attached below. In this sample project, I used FAT16 File Functions to read/write to/from the SD card. Initially, form0 is activated. This will allow you to pick which form you want to show intially on your next startup.

    Pressing either Winbutton0 or Winbutton1 will trigger MagicEvent0 or MagicEvent1. The corresponding form value will be written to config.txt file saved in the SD card. During startup, if this file exists, its content will be read and the corresponding form will be activated initially.

    For further questions, do not hesitate to ask.

    Best Regards,
    Kimberly
    Attached Files

    Comment


    • #3
      Thanks a lot Kimberly. This is great.

      Mike

      Comment


      • #4
        No worries, Mike!

        If you encounter any more issues in the future, just visit the forum.

        Best Regards,
        Kimberly

        Comment

        Working...
        X