Has Gunnery Sergeant Hartman (Full Metal Jacket) says during the riffle pray “There are many like it, but this one is mine”
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Material
Indeed there is many project like available on internet.
This one use a tilt switch as trigger
1 x Arduino board (http://shop.snootlab.com/lang-en/arduino/68-arduino-duemilanove.html)
7 x 500 ohms resitors ¼ W
7 x basic red leds
1 x 10 k ohms resitors ¼ W
1 x tilt switch (I use this one http://shop.snootlab.com/lang-en/parts/96-tilt-sensor.html)
A piece of prototyping board plated holes
Male header (0,1") 1 row, 40 pins (need only 28 for complet arduino connexion , and realy need 10 for this project) http://fr.mouser.com/ProductDetail/FCI/68004-236/?qs=sGAEpiMZZMtsLRyDR9nM10aphOtlQBeldG%252bobNTQj6E%3d
A PC to program the arduino
An soldering iron
Step 2: Prepare the Board
You have to cut the board to get a piece of about 21 x 18 holes (the hole spacing is 2,54 mm)
For this kind of board, just score with a sharp knife, place a metal ruler or similar on the top and snap it.
Then you have to solder the Male header.
First cut the male header in
2 pieces of 8 pins
2 pieces of 6 pins
Then, solder the Male header. Take care of the two 8 pins. They must be tilted to fit the arduino connectors. First, make a try with a single soldering point.
You can find instructable of this here =>https://www.instructables.com/id/Embarassingly-Easy-Arduino-ProtoShield/
and here https://www.instructables.com/id/Arduino-ProtoShield-from-quotHouseholdquot-Ite/
Step 3: Solder the Electronics Parts
Solder the 500 ohms resistors. They must be connected to the male header of the arduino pin 6 to 12
Solder the leds. The “upper” leds must be on the pin 6
Solder the tilt switch and the 10 kohms resistor.
With my tilt switch, I’m using only two pins (see picture)
Add some jumper wire… and finally it should looks like the last picture
Step 4: The Code
You can tune these parameters
If you use deferent pin for your leds or for your sensor
#define led1 6
#define led2 7
#define led3 8
#define led4 9
#define led5 10
#define led6 11
#define led7 12
#define sensorPin 2
Currently this code display two message : “SNOOTLAB” and “RULEZ”
The two messages are define in
char texte = "SNOOTLAB"; // data to write on startup
char texte2 = "RULEZ"; // data to write after "repet" writing of the first message
The message changes after 10 displays. You can change this value here
#define repet 10 //number of repetition before changing message