Skip to content

ViSi-Genie: Water Level Monitoring

Introduction

This codebase example will demonstrate how to get a sensor value with pin input widgets on the ViSi-Genie environment. We will use transistors as switches to act as a sensor, which, when toggled, will activate a magic event. This magic event will evaluate and show the results on display using the tank widget and status on the string widget. The display module will show if the container is empty, running low, above half, or almost full.

Note

Workshop4 Pro is needed for this code example.

Prerequisites

This codebase example assumes the reader can program the 4D Systems display module using Workshop4 IDE designer environment. Beginners are advised to read the following aplication notes.

Needed Materials

  • Gen4-uLCD-43DCT-CLB
  • 30-way FFC
  • 4D-UPA
  • BC547 transistor – 3
  • 10k ohms resistors – 6
  • 100k ohms resistors - 1
  • Jumper wires
  • breadboard

Instructions

Hardware Setup

Refer to the circuit diagram below for the circuit connections.

circuit-diagram

Programming the Display

  1. Download and extract the attached project below.
  2. Navigate to the location of the extracted file and open the waterlvl.4DGenie file by double-clicking or using Workshop4 Pro.
  3. Connect the target display to your computer.
  4. Go to Project tab and set the display to your target display.
  5. Go to comms tab to check if the connected display is detected by the Workshop4.
  6. Return to the Home tab to program the display using the Download button.
  7. A pop-up window will ask you to select the drive to save the .dat and .gci files.
  8. Wait until the download is successful.
  9. Remove the microSD card from your computer and insert it into the card slot on the display.
  10. Power up the display

Attachment

Project File