View source for HANcoder/Examples/Adding a customized block
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
Return to HANcoder/Examples/Adding a customized block.
You do not have permission to edit this page, for the following reason:
The action you have requested is limited to users in one of the groups: Administrators, Bureaucrats.
You can view and copy the source of this page.
Return to HANcoder/Examples/Adding a customized block.
This is a step-by-step guide for creating a custom block in MatLAB/Simulink and how to call custom functions written in the C programming language.
This guide assumes that HANcoder has been downloaded and installed successfully.
The guide is based on an example: a Signal Tower.
The signal tower consists of four layers with two RGB LEDs per layer. Each color can be assigned a value between 0 and 255.
The signal tower is implemented by using WS2812B RGB LEDs
The timing required for generating a serial signal is implemented in C-code by using the microcontroller's SPI.
The result in Simulink will be as follows:
File:Sigal tower block final result.png