Home Creators Posts Import Register Favorites Logout

Content

This post contains the additional resources to accompany the "Play It (Once), Sam" Arduino MIDI puzzle described at https://www.patreon.com/posts/21024263

Arduino code, Wiring diagram, and Fritzing project are available in a single ZIP file which you can download from https://drive.google.com/open?id=18xXqcsI0ZLWSQ5DjECX9t9hk2UFanQ-B 

Parts used:

Arduino Uno, £5 - https://www.ebay.co.uk/itm/Arduino-Uno-R3-Rev3-ATMEGA328P-Compatible-Board-FREE-USB-CABLE-Pins/262200725666

Rockband Keyboard, £15, I'm using the Wii version, but I believe PS3 or Xbox360 versions should work just as well - https://www.ebay.co.uk/itm/WII-Rock-Band-Rockband-3-Harmonix-Wireless-Keyboard-96161/142912531756 

Arduino MIDI shield, £5, it's also possible to make your own, but the cost of components will come out to about the same amount - https://www.ebay.co.uk/itm/Digital-MIDI-Shield-Musical-Breakout-Board-Instrument-Interface-Adapter-Plate/272757940176

WS2812B LED strip, £2.50/m - https://www.ebay.co.uk/itm/5V-WS2812B-5050-RGB-30-60-144LEDs-M-LED-Strip-ws2812-IC-Individual-Addressable/252977225292

2-channel 5V relay module, £2.50 - https://www.ebay.co.uk/itm/5V-2-Channel-Relay-Board-Module-for-Arduino-Raspberry-Pi-ARM-AVR-DSP-PIC/262169825982

12V FailSafe Maglock, £15 - https://www.ebay.co.uk/itm/12V-Door-Electric-Maglock-Magnetic-Safety-Lock-Electromagnetic-Access-Control/123136387155

Piezo buzzer, £0.20 - https://www.ebay.co.uk/itm/10PCS-35mm-Piezo-Elements-buzzer-Sounder-Sensor-Trigger-Drum-Disc-WT/151866700109

330Ω resistor (placed in series with LED strip data in), 470uF capacitor (placed across VCC and GND of LED strip power supply), and 100Ω (placed in series with piezo power line), £0.10

Arduino UNO screwshield, £4.50, this is not necessary, but I have it mounted on top of the UNO as a convenient way to get a reasonably secure connection to bare wire components rather than using Dupont connectors - https://www.ebay.co.uk/itm/Screw-Shield-Screwshield-Terminal-Expansion-PCB-Board-for-Arduino-UNO-R3-DIY/181969360897

Total cost = ~£50

Comments

Russell Hardman

Are there details about how you made your own midi board? I was just about to start this project but couldn't find it.

Sagareth

Hi Alastair, I loved this puzzle when I saw it, and I had an old XBox Rock Band controller, so I thought I would give it a shot. I am having a few problems I hope you might be able to point me in the right direction to figure them out. I have it set up just like your example, except I am using an 8 ohm speaker with a resistor which I cannibalized from an old cordless phone rather than the buzzer. The first thing I noticed was if I "face-rolled" the keyboard, sometimes it would get stuck playing a tone. I could only stop the tone by killing the power to the Arduino Uno. I think I solved this by changing the notes held to only 1, and remarking out some of the code. Specifically, the line to add notes to list in NoteOn, and the Else statement in NoteOff. This is fine fore me since I do not need to play more than one note at a time. The problem I am having now, about 20% of the time the puzzle does not "solve". What happens is the relay makes a smaller click, the replay LED quickly turns on then off, and the mag-lock does not release. Also, the LED strip just goes blank. From this point I am able to just continue hitting keys to solve the puzzle again. Sometime it will do this several times in a row before finally "solving" the puzzle, releasing the lock and doing the LED chase. It does this with the unmodified code as well. Do you have any ideas what may be causing this?

Josh Mortensen

Can you use the USB output of a MIDI keyboard as the input to the USB on the arduino?

Frank

Bonjour, pourriez vous actualiser la liste des composants ? Les pages ebay n’existent plus. Peut être une liste sur Amazon. Merci beaucoup. Frank