Now before we run the code let's go back and understand how the system will work.
Here we have the smartphone.
Once we shake the phone shake dot J.S. will catch the event and access the backend with the API.
The smartphone will access using Wi-Fi and through the router to access the server running on the computer
with API with the IP address.
One ninety two point one sixty eight point one zero one or two the computer will be using a different
network that will be connecting the computer and the drone.
The command will be sent through this network to enable the drone to fly accordingly.
So that was the image of the network system.
Now let's go on to check how we actually made it.
Here you will see the computer which is connected to the drone on the left side through Wi-Fi.
Here you can see the cable connected to my computer since I'm using a fairly recent model.
I'll be connecting my computer with a new SBC adapter which has a USB port the USB cable will be connected
to the network to cable as you follow the cable.
The cable is connected to my Wi-Fi router the black cable coming out of the router will be connected
to my landline.
Over here the phone is currently connected to the Wi-Fi router through Wi-Fi.
You'll see that IP address one ninety to 168 0 1 6 on the screen which is the IP address for the Mac.
Now we see the screen on the computer which will also have the same IP address.
You can see that the smartphone is accessing the server on the computer.
Now we've completed the settings for the shaking.
Now let's try out the game.
You'll see my smartphone screen on the left side.
Once you get to the top page click on the shake game button on the bottom of the screen next.
As we enter the shake game we will choose of course.
Let's say we choose course a then click on the Start button to start your game.
These are some of the videos of me and my family playing the game.
You can see my kids having a lot of fun shaking the fun.
If you have kids I highly recommend them to join the fun but you might just saw my son starting to cry
and leaving the game.
He and his sister got a little too excited with the game and the phone hit his face.
Accidents do happen.
So be sure that no one gets hurt.
And that same for your phone.
As I said earlier going through the entire course I've achieved many knowledges is so you can customize
the codes help ever you want.
The chances are immense.
So I hope you have a lot of fun coding your drum.