This can be a nice intermediate degree Arduino venture for these simply beginning out! After doing a handful of tutorials, I got here up with this venture to tie collectively a number of of the fundamental arduino coding expertise which might be lined within the intro programs. And BONUS – it is tremendous enjoyable for my youngsters!
The wiring and code are quite simple, however with 4 switches, 5 LEDs, and a servo, it is the proper venture to do after studying the fundamentals.
What It Does:
This venture was impressed by the scene in Raiders of the Misplaced Ark the place Indiana Jones steals the golden idol from the pedestal. On this case, the youngsters have to seek out the idols someplace in our home, and place them on the pedestals with a purpose to open the doorways, and retrieve the hidden prize.
There’s a lot you are able to do with this venture as soon as it is completed becuase you’ll be able to conceal the collectible figurines and have the youngsters seek for them utilizing maps, clues, a treasure hunt, and many others.
The 4 idols are mounted on magnets. The pedestals are every a magnet change. Each time you place an idol on a pedestal, it is inexperienced LED lights up. As soon as all 4 idols have been place in a spot, the white LED lights up, and the doorways swing open revealing the key compartment.
Step 1: Components Listing
Step 2: Wiring
Use the graphic schematic to wire up the Arduino as proven. On this drawing, I purposefully ommited the breadboard as a result of I believe others may be capable to provide you with a extra elegant format than I did. This drawing will present you the way to join every thing correctly, however you’ll be able to select the way to lay it out on the breadboard or PCB.
I did embody a photograph of my format in case useful!
Step three: Code
As I discussed, this venture is nice for newcomers following the intro tutorials! You may discover that all the code comes immediately from the intros, however is repeated a number of occasions as a result of this venture makes use of four “buttons” (on this case magnet switches), 5 LEDs, and a servo.
The idea is the thought of the “buttonSum” which is only a variable that shops how most of the switches are have been activated. As soon as buttonSum equals four, the door opens.
Direct hyperlink to the sketch in Arduino Editor: https://create.arduino.cc/editor/opersing/68fd9f5f-e15b-4a2a-b6b9-e4076fe2beeb/preview
Step four: Building
I constructed this by gluing two separate packing containers collectively. On this case, I repurposed outdated Kiwi Crates, however shoe packing containers would work simply as properly! The bottom line is to attach the 2 packing containers in a manner you can entry the innternal workings – each the Arduino, and the servo mechanism that opens the door.
For the underside field, hotglue the Arduino and Breadboard in place so they do not slide round. I like to recommend utilizing a field that has a related flip lid. It will hold all the cables to the LEDs and switches related whenever you open the field.
When you glue the Arduino down, punch holes within the lid of the field for the LEDs and magnet switches. The location would not matter, I put all of them in a row, and any magnet can activate any change, so choose a format you want.
The highest field needs to be glued on prime of the decrease field standing up so the 2 packing containers create an “L” form. The highest field needs to be glued to the decrease field with it is backside dealing with the switches and LEDs. Which means the highest boxe’s lid will make a wonderful entry panel for accessing the servo motor and door mechanism.