-
1Step 1
Uploading Standard Firmata to Arduino
To connect PHIRO Pro and Arduino with Pocket Code we will need to have the Standard Firmata on the Arduino Board.
In Arduino IDE,
Select the COM Port - Tools -> Serial Port -> Corresponding COM Port
Next select your Arduino Board. Tools -> Board -> Your Arduino Board
(We have used an Arduino Uno, but you can use ANY Arduino board)
Next we are going to select the Standard Firmata. Click on Examples -> Firmata -> Standard Firmata
Click on Upload. -
2Step 2
Connecting Bluetooth module and Motor Driver to Arduino
Arduino D3 - Motor driver M1 IN1
Arduino D4 - Motor driver M1 IN2Connect motor terminal to motor drivers M1 OUT
Arduino D0 - HC05 Tx
Arduino D1 - HC05 RxPower your Arduino and Motor driver with a 9V battery.
-
3Step 3
Mounting LEGO(R) construction and Electronics onto PHIRO
In addition to LEGO(R) connectivity on it's body, PHIRO also comes with a cool LEGO(R) accessory that can be plugged into PHIRO to fix pieces on top as well. We made a single motor powered Robotic arm using some LEGO(R) pieces. Here is a photo showing the PHIRO LEGO(R) adapter with the construction we made.
Notice that we have used a LEGO(R) motor, however any DC motor can be used in it's place.
All we have to do is attach this on top of PHIRO as shown below.Now we move onto mounting the Electronics (Arduino, Bluetooth and Motor Driver setup) on top.
All we did was tape them down onto the LEGO(R) construction made previously. Our result looked something like this.Now let's see how to program using Pocket Code.
-
4Step 4
Programming PHIRO Pro and Arduino with POCKET CODE
Make sure both PHIRO Pro and the Arduino setup are turned ON. PHIRO should be in Mode 3 (Bluetooth Mode). Pair both devices to your Android smartphone. In case you haven't, download the Pocket Code app on Google Play for FREE here. Here is a video showing step by step instruction to program PHIRO and Arduino.
-
5Step 5
HURRAY! We're done!
Here is a video of PHIRO with the Arduino powered Robotic Arm.
Driving is done by tilting the smartphone, and the Arm is programmed to close automatically when PHIRO's bottom sensors detects a black line.We put a ball near black line. For the black line, we used a small piece of black insulation tape. Hope you guys liked out tutorial! Do share your suggestions and comments below.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.