The first post in a 3-part series showing off some tech I recently added.
I wanted the arcade to “turn on” whenever someone walks up to it, so I wired up my MAME front-end, MAMEIron, to the webcam. Whenever someone comes into view of the webcam, or it senses a change in the environment (like a light turning on), the cabinet will “turn on” by fading from black into the front-end, with a little boot-up-sequence sound effect 🙂
Special nod to noirenex for the sound effect: https://www.freesound.org/people/noirenex/sounds/98883/
I launch MAMEIron with an opacity of zero, and then slowly increment it to 1 over the span of 22 seconds (the length of the sound effect). The sound plays in a background thread so the UI doesn’t get locked up.
I used AForge.NET to interface with the webcam, and it checks for motion on every frame. If there has been no motion for 15 minutes, MAMEIron will reset it’s opacity back to zero, and (after “Part 2 of 4: Motion activated lights” is complete) the lights will turn off. If motion is detected, and MAMEIron is currently in the “off” state, everything turns back on.
The video output at the lower-right of MAMEIron exists purely for debugging purposes and will get hidden once I have all the kinks worked out.
Part 1 of 3: Motion-activated
Part 2 of 3: Programmable lights
Part 3 of 3: Voice control