Contains the code to use Minikame Mk2 using a raspberry pi
- Raspberry Pi
- Arduino
- 3D Printed Parts
- 8 Servo Motors from: Amazon
Quantity | File |
---|---|
1 | body_base.stl |
1 | body_top.stl |
2 | leg.stl |
2 | hips.stl |
1 | body_shafts.stl |
- Arduino IDE Download
Download the Arduino IDE Linux-ARM version on your Raspberry Pi
- Upload the "PiArduinoCommunicationTest.ino" which is in "RaspberryPi-Minikame/Pre-Assembly Checks/Serial Communication Check/" to your Arduino Board.
- Open a new terminal on your Raspberry Pi and execute the following:
sudo apt-get update
sudo apt-get upgrade
git clone https://github.com/LakshBhambhani/RaspberryPi-Minikame.git
cd RaspberryPi-Minikame/Pre-Assembly Checks/Serial Communication Check/
sudo python pi_duino.py
Open the serial Monitor on the Arduino IDE and check for "hi" and "hello" being printed
- On the same terminal as before execute the following:
cd ..
cd Server Check
sudo python weblamp.py
Now if you load the URL on browser, you should see a weblamp control page. Your URL would be the IP address of your raspberry pi. Ex: 192.168.0.36
Number your servos and upload the following code to arduino to home your servos. Remember: Each servo has been set to a different home location. So each one has a different use and cannot be mixed up randomly later.
Connect the Raspberry Pi to Arduino using a USB cable
Connect the Servos using the following port numbers:
FL_HIP = (4);
FL_FOOT = (5);
FR_HIP = (6);
FR_FOOT = (7);
BL_HIP = (8);
BL_FOOT = (9);
BR_HIP = (10);
BR_FOOT = (11);
Execute the following in your terminal to get your server up and running. For now, you might have to execute the server python file each time your pi reboots. V2 of RaspberryPi-Minikame should get rid of that
cd RaspberryPi-Minikame
cd Server
sudo python quad.py
Use this code: "ArduinoQuadruped.ino" Link to Quadruped Robot code
You can either modify the app for yourself using the files in the App Folder or use the default provided apk
Alternatively, you can also use the files for IOS app, clone it in Xcode and run and install it on your phone
Remember: To use it, run the server and keep your serial port of your arduino application on rpi on