フィルターのクリア

Activate a pulse generator from an if block

1 回表示 (過去 30 日間)
PTSI2017 Mounier-Vehier
PTSI2017 Mounier-Vehier 2017 年 12 月 3 日
回答済み: Nick Choi 2017 年 12 月 5 日
Hello, we are trying to blink a LED on the Arduino card. But we want to turn the light on if our variable is bigger than a certain value. We used an if block to determine this but we do not know how to go from the if block to the pulse generator (which ten makes the light blink). Thank you for your help

回答 (1 件)

Nick Choi
Nick Choi 2017 年 12 月 5 日
You could use a 'Compare to Constant' block to compare the signal/variable against the specified value and this could be used to turn the LED ON/OFF via the 'Digital Output' block. Additional information on the 'Compare to Constant block' can be found in the following documentation link:
Also, the following example shows how to blink an LED on an Arduino when a signal exceeds a certain value: https://www.mathworks.com/help/supportpkg/arduino/examples/communicating-with-arduino-hardware.html

カテゴリ

Help Center および File ExchangeArduino Hardware についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by