Skip to content

ViSi-Genie Magic: Arduino Data Logger with File Size

Introduction

This codebase example demonstrates how the different file access operations are used in a single Arduino sketch or program. The file access operations demonstrated in this codebase example are the file read, file append, and file size or length request.

Note

Workshop4 Pro is needed for this code example.

Prerequisites

This codebase example assumes that the reader has read and understood the following codebase examples:

Basic knowledge of how to interface an Arduino host to a 4D display module is also required. Beginners may refer to the application note ViSi-Genie: Connecting a 4D Display to an Arduino.

Instructions

Follow the procedure below to run this example. The reader is also advised to watch the accompanying video.

  1. Extract the content/s of the Workshop4 Project zip file to a folder.
  2. Open the project in Workshop. Note that Workshop4 Pro is needed for this codebase example.
  3. Compile the project source code and download or upload the program to the target display module (a uLCD-32PTU in this codebase example). Let Workshop copy the supporting files to a uSD card mounted to the PC.
  4. Also, manually copy the files "1.txt", "2.txt", and "3.txt" to the uSD card. These files are found inside the sub-folder "uSD card files" of the folder "Workshop4 Project".
  5. Properly unmount the uSD card from the PC and mount it to the uLCD-32PTU.
  6. Extract the content/s of the Arduino sketch zip file to a folder.
  7. Open the sketch in the Arduino IDE, compile it, and upload the program to your target Arduino board (an Arduino Uno for this codebase example).
  8. Properly connect the Arduino Uno to the uLCD-32PTU. Note that in this codebase example, the 4D Arduino Adaptor Shield (rev 2.0) was used.
  9. Open the Serial Monitor of the Arduino IDE.

The application should now run. If not familiar with the details of the steps above, see the application note ViSi-Genie: Connecting a 4D Display to an Arduino.

Attachment

Project File