File Exchange Pick of the Week

Our best user submissions

Arduino Blinking Heart Motion Sensor

Posted by Sean de Wolski,

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.

Comments

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


Get the MATLAB code

Published with MATLAB® R2015b

Note

Comments are closed.