Multiplayer Wack a Mole

by LiamEggermont in Circuits > Raspberry Pi

1113 Views, 15 Favorites, 0 Comments

Multiplayer Wack a Mole

IMG_20220619_223522.jpg
IMG_20220619_223522.jpg
IMG_20220620_093833.jpg

I made a multiplayer wack a mole style game that is compatitive and fun!

Supplies

61rLVXkbaJL._SX522_.jpg
550x448.jpg
550x614.jpg
1200x558.jpg
1200x1110.jpg
1200x1183.jpg
arduino.png
buzzer_f.jpg
DEBO_SENS_3AXISH_01.jpg
image.jpg
KW-2502-1-2560x1706h.jpg
MDF-plaat-122x61-cm-8mm_133812_000_440x330.jpg
ms55_1_1.jpg
Steigerhout-62x30-mm-250cm_08711283377919.png
Audiokabel-2G-0,75mm²-25m-rood-en-zwart_05412748505795.jpg

Make Custom Circuit Boards

Project1_schem.png

First you are going to need to make the folowing electronic schematic. It would be best to solder it to a pcb, to make it more durable than on a breadboard. Because it needs to be in a table where people are hitting realy hard.

For the pcb it would be best to make the following boards:

  • - power delivery board
  • -board where hall sensors connect to the 3 ADCs
  • -Main motherboard with connectors to lcd, arduino, raspberry pi, gyroscope and all the conectors to the other boards


Make Enclosure

dfmqdjflkqdsjfdqsf.png
Untitled.png
Untitlqqqdeeffed.png
Untitffdsled.png
Untitlqdfed.png
Untitfgjfghhgsfgfhrdled.png
UntitlfffrresssfssqDFed.png
Undfdsfttyyuugtitled.png
Uhrusdbggfdntitled.png
qdfqdfqdsfjghlktdfgkwdsdfsgfdhuiuhcbdgfsdqdQ.png
qdsfdqsfqsdtzretrqsdcqfdqsf.png
sqdqdsffqajdfvkjdfsdfg.png
Untitlqdfqsdfqsdfggfhdgfsfqdsfqsdtsfdgsfdged.png

Next is the Enclosure. In the first picture you see the final product, in the next 4 the front plate the depth of the indentation is 12mm, the next 2 the 2 side plates and the final 2 the backplate. The front, back, and side plates are all 18 mm wide

Make Sphere's

qdfqdfuyretgdf.png
IMG_20220606_142851.jpg
IMG_20220606_142857.jpg
received_1973052422890116.jpeg
IMG_20220620_110127.jpg
IMG_20220620_111107.jpg

To make the spheres you first need to sand all 20 half spheres, than make for each sphere a round seal out of the left over circkles of the top wooden board. Next you need to solder 3 leds of the ledstrip inside each speher. lastly glue a magnet to the underside of the sealing lid of each sphere.

Layout Inside Enclosuer

IMG_20220615_132159.jpg
qqdqsd.png
IMG_20220620_111456.jpg

layout the spheres in a snaking motion as shown on the second picture. Next solder and glue the hall sensors under the spheres directly under the magnets. and finaly connect everything to the correct position on your pcb's

Database

qqdfsdf.png

Make in MySQ

Install the Custom Image on the Raspberry Pi

Download needed files:

download and install Raspberry Pi imager

download and unpack the custom image

place the sd card in your sdcard reader

open imager -> choose OS -> Use custom -> select .img file -> choose storage -> selecteer device -> write

place the sd card in the pi (THE PI MUST BE FULLY POWERD OFF!!!)

download and install VNC Viewer

Login:

Power the pi on

connect with VNC viewer on the ip adress: 192.168.168.169 (the network cable must be plugged in)

login with user: student and pasword: W8w00rd

Settings:

open a terminal and do the folowing inputs:

sudo raspi-config:
ADVANCED -> expand file system

reboot the pi

sudo reboot now

Install the Needed Libraries on Raspberry Pi

Needed setup:

add folowing commands to the terminal:

sudo apt install git
pwd (this is to make sure we are in the how dir)
mkdir projectCode
cd projectCode
sudo raspi-config
interface options -> SPI -> YES -> YES
interface options -> I2C -> YES -> YES
interface options -> SPI -> NO -> YES -> OK
FINISH

Install packages

sudo reboot -h now
sudo apt install python3-dev python3-pip
sudo pip3 install spidev
sudo pip3 install mfrc522
git clone https://github.com/howest-mct/2021-2022-projectone-EggermontLiam.git

Start Script on Boot

Run script on boot:

open a terminal and do the folowing inputs:

cd
sudo nano mijnproject.service

in this file add the folowing content:

[Unit]

 Description=ProjectOne Project 
After=network.target 
[Service] 
ExecStart=/usr/bin/python3 -u /home/student//backend/app.py 
WorkingDirectory=/home/student//backend 
StandardOutput=inherit 
StandardError=inherit 
Restart=always 
User=student 
[Install] 
WantedBy=multi-user.target

Then do

ctrl+x -> y -> Enter

to save the file

then do the folowing command in the terminal:

sudo cp mijnproject.service /etc/systemd/system/mijnproject.service

To test the system do the following:

Start:

sudo systemctl start mijnproject.service

Stop:

sudo systemctl stop mijnproject.service

If this works correctly you can do the folowing:

sudo systemctl enable mijnproject.service