simulink support for Arduino evaluation

조회 수: 2 (최근 30일)
Özgür Alpan
Özgür Alpan 2013년 1월 20일
Hello,
I need to create simulink model that will perform below function with Arduino target device.
I have 3 digital inputs and 2 digital outputs.
All inputs and outputs will be TTL level logic 0-5V.
1st digital input called sensor1
2nd digital input called sensor2
3rd digital input called sensor3
1st digital output called motor1
2nd digital output called motor2
I need simulink block (or stateflow) that will perform below statements.
if sensor1==1 than motor1==1
else motor1==0
if sensor3==1 than motor2=1
else motor2==0
if sensor2==0 than motor1==1, motor2==1
else motor1==0, motor2==0
So please help me that how can I create this steatements with simulink block (or stateflow) diagrams.
Thanks,

답변 (2개)

Kaustubha Govind
Kaustubha Govind 2013년 1월 21일
You should be able to use blocks from the Logic and Bit Operations library to implement the logic portion. For Arduino specific blocks, you can either use the Arduino support package for versions R2010b, R2011a, and R2011b (Windows only); or the built-in Simulink Arduino library for R2012a and later.

Özgür Alpan
Özgür Alpan 2013년 1월 21일
Do you know for example OR gate is supporting with Arduino Digital input - output blocks?
Also could you give advise how is the logic look like?
thanks
  댓글 수: 1
Kaustubha Govind
Kaustubha Govind 2013년 2월 1일
Yes, the logic blocks are supported with the Arduino blocks.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Arduino Hardware에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by