Introduction: Kitchen Timer

About: 4D Makers is a group of curious engineers and enthusiasts who finds great satisfaction in creating and building anything from electronics.

This features gen4-uLCD-35DT which will be used as a secondary display for a Raspberry Pi project, the Kitchen Timer. It is a useful application for most of the mothers and cooking-enthusiasts out there.

This can be used to monitor time when cooking your favorite dish.

In this demo the Raspberry Pi acts as a host which controls the gen4-uLCD-35DT. The gen4 HMI module was programmed with different forms and widgets, which are then controlled depending on the commands sent by the Raspberry Pi host and vice versa.

This program is tested on Raspberry Pi 2 with Pixel image. It can also run on other Raspberry Pi variants. But, if you are using Raspberry Pi 3, make sure that you first visit this link:

https://www.raspberrypi.org/forums/viewtopic.php?... to configure the UART of Raspberry Pi 3.

This demo was tested on a Raspberry Pi 2 running Raspbian with PIXEL. It can also run on other Raspberry Pi variants. However, if you are using the Raspberry Pi 3, make sure to visit this link first to properly configure the UART port:

https://www.raspberrypi.org/forums/viewtopic.php?...

Step 1: Build

Components

  1. gen4-uLCD-35DT
  2. uSD Card
  3. 30 way FFC Cable
  4. gen4-PA or gen4-IB
  5. Raspberry Pi 2 Model B
  6. Raspberry Pi Adaptor
  7. 5 Way female to female connector
  8. 5 volts power supply

Clarification about the components

  • Use gen4-interface board and uUSB PA-5 to connect the display to the PC as shown in the first image above.
  • Or if you have gen4-PA board, connect the display to the PC as shown in the second image above. You can also use the gen4-PA board if you want to use its GPIO pins.

Step 2: Program

Download the project here.

  1. Extract the attached zip file to a folder then open the ViSi-Genie project “demo1”
  2. You can edit the widgets in each form by using the Object Inspector.
  3. After opening the project file, go to the Project menu and make sure that the Comms Speed and Display parameters are correct as shown first two image above.
  4. Connect gen4-uLCD-35DT to the PC
  5. Now go to the Comms Menu and select the correct COM port for the uUSB-PA5, then click on the red button, as shown below.
  6. If the uLCD-220RD is properly connected to the PC, the red button should now turn blue and the name of the display module should be displayed.
  7. At this point, mount the uSD card to the PC using a uSD card reader or adaptor. Go to the Home menu and click on the (Build) Copy/Load button.
  8. The project should now start the build and compile process.
  9. Worshop4 will prompt for the correct drive for the uSD card. Select the appropriate drive from the drop-down menu.
  10. Workshop4 will then compile the source code and download the program to the flash memory of the display module.

Now unmount the uSD card from the PC and mount it to the uSD card slot of the gen4-uLCD-35DT. Winbutton widget should now appear on the display. It is now ready to receive commands from a host. Shown in the third image

  • Download the ViSi-Genie-RaspPi Library

The Raspberry Pi must now run a program which will communicate with the uLCD-220RD. The source code for the program is attached. To be able to compile the source code on the Raspberry Pi, you need to install first the ViSi-Genie-RaspPi-Library, which can be downloaded from this link:
https://github.com/4dsystems/ViSi-Genie-RaspPi-Lib...

Follow the instructions on how to install the library on that link.

Step 3: Connect the Raspberry Pi to the ULCD-220RD

Connect the 4D-Serial-Pi Adaptor to the Raspberry Pi, then connect the 5-way cable to the 4D-Serial-Pi Adaptor. Lastly, connect the other end of the 5-way cable to the gen4-IB of the gen4 module.

Or you can interface gen4 module and Raspberry Pi with the gen4-PA using the image above.

Step 4: Setup the Raspberry Pi Host

After installing the library and connecting the hardware, you can now compile the source code and run the program on the Raspberry Pi. Follow the procedure below.

  1. After Downloading the file, open the terminal and go to the folder which contains this file: Kitchen-Timer-Code
  2. Unzip the file using this command:
    pi@raspberry: ~ $ sudo unzip Kitchen-Timer-Code.zip
  3. Navigate to the folder where the contents of “Kitchen-Timer-Code.zip” were extracted to.
    pi@raspberry: ~ $ cd Kitchen-Timer-Code
    pi@raspberry: ~ $ cd kitchenPi
  4. In LX Terminal type the command to compile :
    pi@raspberry: ~$ sudo make
  5. Run the program using this command:
    pi@raspberry: ~$ ./kitchenPi

The gen4 display module should now start displaying the different widgets, according to the serial commands received from the Raspberry Pi host.

For more information, see the application note:
ViSi-Genie Connecting a 4D Display to the Raspberry Pi