"This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com)"
This instructable to will cover how I went about making my very own Pokestop modeled after the pokestops from the new mobile app Pokemon Go
Step 1: What Parts Do You Need?
When it comes to parts that need to be 3D printed, there are only five of them. These include 3 separate pieces to make the poke ball that sits on top, the stand, and a customized lid for the box the pokestop sits on top of. The reason there are three different pieces for the poke ball is because I wanted each half of the ball to be a different color that looks as much like a basic poke ball as possible. The files for each of the parts are attached and the colors I used for each parts is in the file name.
Other than the 3D parts you will also need an Arduino (I used the Uno), usb cable, HC-SR04 Ultrasonic Ranging Module, IIC 1602 LCD, stepper motor, breadboard, breadboard jumper cables, and some epoxy.
Step 2: How Do You Put It Together?
So the part that I found most difficult with this project is wiring it up. This project uses just about every available port on the arduino uno so there is a lot to keep track of. I have attached a picture of a fritzing diagram that should assist in wiring everything.
Now it comes to attaching all the 3D parts. This is fairly simple. For the pokeball, each of the halves has a small pole sticking out and each it goes into the black cylinder. Apply epoxy to the poles before sticking them in to ensure that they won't come apart. Next, there should be a long pole coming out of the bottom half of your now complete poke ball. Run the pole through the middle of the stand then through the small hole on the back side of the box lid. This will line everything up so that you can apply the epoxy to the bottom of the stand and stick it in place on top of the box lid. Just make sure you keep the epoxy far enough away from the hole and pole so it doesn't get stuck. Furthermore, the pole has a small hole at the bottom that should fit around the stepper motor so the motor can spin the pole. You can add some glue or tape here to ensure they stay together but I find it unnecessary. Finally, you can either tape or glue the LCD and proximity sensor to their respective holes of the box lid. I chose tape instead of glue in the event I wish to reuse these parts for a later project.
Above I have attached a picture of everything put together and the layout of the inside of the box with the breadboard, stepper, and arduino.
Step 3: The Code
The code is fairly simple and straight forward. First you needed to call a few classes, StepperAK for the stepper motor and Wire and LiquidCrystal_I2C for the LCD display. As for the pins on the arduino, you need to assign pins for the proximity sensor, stepper, and attach the LCD to the analog pins. In the setup, you need to create a myDisplay and a myStepper. You also need to set the speed of the stepper, initialize the LCD display and assign the chopin as in input and the triggerman as an output.
In the loop you need to use digitalwrite and pulseIn to create a readable echo for the proximity sensor. I then created a prompt to ask the visitor to swipe their hand over the sensor and when their hand is 2 inches or less over the sensor it will spin the poke ball. This can be done by an if statement. After the poke ball spins then thank them for visiting and clear the display and start everything over.
Step 4: The Final Result
After the pokestop has been assembled and the arduino programmed, this what the final result should look like.
We have a be nice policy.
Please be positive and constructive.