It is simply a shooting game like Hit The Duck, which reminds me of my childhood games. It is a fun, stress-reliever, and it gives you a satisfying feeling when you win.
And now you can hold a real gun while shooting.
The game is based on the analog read from the LDR sensor. The ldr sends the value to the Arduino when the trigger is pulled. If the ldr value is greater than 100, the Arduino will send W to processing. If it is less, the Arduino will send B to processing by the serial monitor, and with every pushed the character named bullet will disappear from the LCD screen
If processing reads W, bullets will decrease until it equals (0), then a message will appear (game over).
The message will appear (gada3) if the processing read (B) score increases by one until it equals (10).
Electronics
push button
LDR sensor
lcd i2c
Arduino id3
jumpers
9v adaptor
Tools
cutter board
cutter - scissors
glue gun
driller
spray paint
Softwares
Tinkercad
Arduino ide
processing id3
RDworks
cura
fusion 360
Materials
cardboard
ply wood
pla
screws and nuts
Machines
laser cutter
3d printer
After prototyping my project, I started by sketching it in Fusion 360, After
we finish sketching,
we extrude the 2 faces of the enclosure to 3 mm and then project the components on the faces by pressing P and choosing a surface. After we project the components, we start the assembly of all parts together by joining them. Give the enclosure a wooden texture by choosing wood from appearance.
Then I designed the light tube by drawing a circle and extruding it, then shelling it.
sketch the lcd face
sketch the Arduino face
sketch the joints parts
the push button part
assemble parts together
sketch the light tube and preparing it to revolving
revolve it and give it a white color
the tools in the lab was very useful to edit our projects
I started by laser cutting the wood pieces. (Laser cutter CUT Speed: 10, Power: 60)
After saving my files as a DXF files , I import them into RDworks and remove any unnecessary lines.
I adjust the speed and the power parameters. (Laser cutter CUT POWER: 60, CUT SPEED: 10)
The final design, after modifications to the old design and avoiding previous problems.
It was the first attempt in manufacturing to test the grip of the project and whether it would accommodate the components or not.
its a simple circiut consisting of push button and LDR sensor with LCD
The ldr sensoer is linked to the Arduino via jumpers on pins (A0) and (3v) and functions as an INPUT.
pushbutton on pins (13) and (gnd) works as an INPUT.
The lcd is connected with an I2C ship and it is connected with the Arduino on pins (5v, A5, A4, Gnd) and it works as an output.
And they are all powered by a 5 volt adaptor.
The project will be powered by the 5v ADAPTOR, and data will be sent from Arduino to Processing via the USB cable.
The 9V adaptor is connected to the Arduino and powers the LCD with 5 volts and the LED will be powered by the Arduino with 3.2 volts the Arduino have a regulator to divide the electricity to power the LCD and the LDR.
The logic is that when you pull the trigger, the LDR sends a value to the Arduino and Arduino processes it, then sends it to processing. The characters on the LCD (bullets) decrease by one, and the LDR sends the value to the Arduino, which then sends it to processing for tack action based on the read from the serial monitor.
When processing received W or B bullets on the screen will decrease by one, and if they receive B, their score will increase by one.
After fabrication, I started mounting components with the body of the enclosure. Every part was in the place it was meant to be. I joined them with screws and nuts.
Test the project after the integration and
the mounting of the components.
painting the enclosure with red and black spray to add some style to it
I was lucky to be part of a group acting like a family. We care for each other and we try to share solutions together.
Because I have some experience working with wood, I assisted my colleagues in resolving issues that arose during or after the fabrication process.
Dealing with processing was fun, but I faced a huge problem in linking arduino with processing, I searched a lot and didn't find answers, so I asked Amr Okasha to help me figure out the solution. We searched together, and then we found a command calling log (); that's was the missing part.
A multiplayer mode, two players will each play as the hunter, and the other will be the hunted. The hunter will control the ball with a command called mouseX, offering him to move with the mouse movement, and the hunter will try to hit it with the gun.