Please enable JavaScript to view this site.

Waijung 2 User Guide

Introduction

This tutorial demonstrate how to use Waijung2 ESP32 block set to conduct  testing with Deploy to Hardware Mode.

Using "deploy to hardware mode" as a manual testing method involves deploying the software model directly to the hardware and then manually testing its functionality.

This approach can be useful when the software model needs to be validated in a real-world environment, and the behavior of the system cannot be accurately captured in a simulation.

 

Here are some pros and cons of using "deploy to hardware mode" compared to other testing methods:

 

Pros of DTH testing:

Allows for testing of the software model in a real-world environment.

Can be useful for validating system behavior that cannot be accurately simulated.

Provides a quick way to check if the software model works as expected on the target hardware.

 

Cons of DTH testing:

Manual testing can be time-consuming and error-prone.

May require specialized hardware and software configuration.

It can be difficult to reproduce specific test cases, making it challenging to track down and fix bugs.

Prerequisites

ESP32 development board

USB cable

Waijung2 ESP32 blockset installed in MATLAB/Simulink

Basic knowledge of MATLAB/Simulink

Block in use

LED Control Setup Block

DHT_001

LEDC Control Block

DHT_002

Use Case Scenario

Test on-board LED

 

Test Cases

TC001: Blink ESP32 on-board LED

Fade in and out LED on the ESP32 with the sample time of 1 second.

Expected Outcome

Fade in and out ESP32 On-board LED

Setting Up Test Cases

Step 01: Create Test Model

DHT_003

Test Model: deploy_to_hardware.slx

Step 02: Check Execution order

Right click on the model space> Other Displays> Blocks> Sorted Execution Order

DHT_006
DHT_005

Step 03: If execution order incorrect > Set priorities to require blocks

Right click on the block that require priority change >  Properties > Type the priority number in the Priority field box. (Note: 0 is the highest priority).

 

DHT_007

Step 04: Open Waijung2 Target Setup block Mask and Select Build Option to "Deploy to hardware"

DHT_004

Step 05: Connect the ESP32 development board to your computer using a USB cable

DHT_008
Step 06: Configure ESP32 Device on the Waijung2 Target Setup Mask
DHT_009

Step 07: Build the Model to the ESP32

Select "APPS" Tab and Select "Embedded Coder"

DHT_010

Select "Build" button to Build the model to hardware.

DHT_011

Results

 

DHT_012

Copyright 2024 Aimagin Co.,Ltd. Rev.1454