In order to get through the task, me and James started working in the last 30 minutes of class. It was my first time experimenting with servos – so it is always better to get help with someone with more experience.
Bill of Materials;
- Breadboard
- Servo
- Cables
- Piezo / Speaker
- Pirate Game Sheet
This is what the sheet looked like;
As the second step we cut out the arm and taped it on the servo / also we connected piezo and the servo to the Arduino.
The next step was to indicate the perfectly guessed numbers for the placement of the treasure. So we indicated the ( PERFECT X and PERFECT Y ) zones.
We declared the zones, however the Servo was still not calibrated so we had to learn about the degrees of our perfect x and y zone. We did this by using the example sweep sketch which was included in Arduino IDE.
The class was over, we decided to work separately and share our work with each other over the weekend.
But then few people from class decided to work on their homework in the University Center – so I decided to join them. Me and Mana worked on the rest of the HW together, with sharing information with our other friends who joined.
We started with doing brainstorming on the board, we re-calibrated the servo and thought about solution code.
Then Kait came up with one!
After that point, all we had to do is add the code with new numbers and change the tunes which were included in the example code by our instructor.
Code;
The code can be find in my GitHub repository–
https://github.com/emres13/DT-Lab-2-/blob/master/PirateGame