Magic Mirror
I wanted to change my live halloween portrait because it was starting to be known, I had an old Galaxy tab 10.1 that was sleeping, so I wanted to recycle it. I therefore offer you a "magic" mirror, which works with an Arduino and an application that I created with Appinventor, the application detects the state of the Arduino sensors using bluetooth and starts the video start. For the moment I only use two but there is the possibility of adding a lot more.
We have 2 possibilities of sensors:
1- The hr04 ultrasound which will make it possible to have the possibility of adjusting the detection distance in a large value. (there may be issues with this one)
2- A PIR sensor (long distance) and an IR sensor (short distance) so 2 separate sensors (works perfectly)
You have the possibility to put a sensor for the sound, a switch or whatever you want ...
Supplies
Self-adhesive film for one-way mirror
Arduino nano
Bluetooth module HC 06
H04 sensor or pir sensor, ir sensor, switch...
A glass
Android tablet
Place the film mirror, on the glass avoiding blowing bubbles to have a realistic effect.
Cut a black sheet to the size of the glass leaving a space of the screen size (real) of the tablet less than 1 cm on each side and 2 cm high
For the fixing I used metal plates, it is absolutely necessary that the on / off button is accessible.
Arduino
Install the sensors of your choice and if necessary modify the code for the pins.
So that it is not too repetitive, there is a waiting time for the videos, this one is adjustable in the Arduino code:
attente1 for video 1 and attente2 for video 2.
Thanks to "lesept" of the arduino.cc forum for his help on the timers
In file you have the 2 codes:
- Ultarsound for the HR04
- 2sensortimers for other sensors
const unsigned long attente1 = 2ul * 60ul * 1000ul; const unsigned long attente2 = 30ul * 1000ul;
Android
In Appinventor gallery find the videoduino application or redo it with the models in the photo, you must change the mac address with that of your bleutooth module and put your videos in the "pictures" path.
In the app, there is a timer that blocks the tablet from going to sleep.
Also install the StartupManager application, this will allow you to launch Videoduino when starting the tablet without needing the touch screen which will not work behind the glass.
Test
First connect the arduino to the power supply (a charger socket), then start the Videoduino application which will automatically connect to the bluetooth module, place the sensors as close as possible to the mirror.
For create the videos, you can to be the actor yourself or create talking pictures with for example Crazytalk.
Enjoy :)