Professional Documents
Culture Documents
Batch -F
Group Members -
There are two fixed targets each having a light sensor in the
centre and a servo motor attached at the bottom. The duty
cycle of the servo motor is used to control at which angle it
is currently at. When the target is shot the duty cycle is
changed to make the target fall down.
The light sensor values are being fed to a parallel thread
which confirms whether the value is greater than the
threshold which will happen when the person is shooting in
the sensor.
This thread also matches the value of the box person is in
and the box he is supposed to be in.
If all conditions are true then this thread would handle the
servo motors in such a way that they drop down. Further it
will never check these light sensors again.
The Gun is the central part of the game and is what the user
uses to shoot the target. It has a laser attached on its front
which is used to hit the targets and also a haptic sensor
attached at the back.
Whenever any target is shot down a Haptic Response is
used to indicate to the player that the target has been shot.
4) Moving Target
The third and the most difficult target to hit is the moving
one. The target is being moved using two DC motors and a
thread wound on them. The two DC motors move in
opposite direction for the correct unwinding and winding of
the thread.
5) GUI
6) MQTT
Its job is to receive input from the user and send in the
direction continuously to the Remote Desktop on the Pi.
2) Remote Desktop for Leader Board, Running on topic 2
(Subscriber Only)
Till the light detect sensor of the moving target is hit and
Topic 1 receives the message to end the movement, it acts
as a subscriber continuously receiving messages on Topic 1
and moving the motors accordingly.
After the light detect sensor is hit, the code waits for the
main program to get over and sends the time of the user to
leader board remote desktop.
SENSORS
DC MOTOR
Motors convert
electrical energy into
mechanical energy (used to cause rotation).
The size of the force, which determines how fast the motor spins, depends
on the following:
a) The amount of current in the wire,
b) The length of the wire
c) The strength of the magnetic field
Force = (current) x (wire length) x (magnetic field)
The direction of the force, which determines which direction the motor
spins, depends on the following:
a) The direction of the current in the wire
b) The direction of the magnetic field
Parallelism