File Exchange Pick of the Week

Our best user submissions

Arduino Blinking Heart Motion Sensor

Sean's pick this week is Arduino Blinking Heart Motion Sensor by Ye Cheng.

My pick this week is one of the many submissions on the File Exchange that mentions Valentine's Day somewhere in the description. However, unlike any of the others, this one runs standalone on an Arduino so I can set it up somewhere in my house an surprise my wife with it.

So what does it do? The Arduino is connected to a motion sensor and a breadboard with red LEDs on it shaped like a heart. When the motion sensor trips, it blinks the LEDs.

The controller is built in Simulink. It uses Stateflow for the supervisory control logic and the Arduino Simulink Support Package so that the model can be embedded on the Arduino.

Here's a snapshot of the Stateflow logic:

So if you're curious what happened when I set this up in my house, here's a video. The motion sensor is very sensitive.

Many thanks to Ye for providing me with the hardware.


Give it a try and let us know what you think here or leave a comment for Ye.

Published with MATLAB® R2015b

  • print


댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.