Introduction to Scratch 4 Phiro

Learners will be introduced to using Scratch programming language to program & control Phiro robot.


By the end of this lesson, learners will be able to

  • connect Scratch software to Phiro hardware via Bluetooth
  • become familiar with Scratch extension blocks for Phiro
  • be introduced to creative coding with Phiro & Scratch by exploring example program
  • Imagine possibilities of their own Scratch-based creative coding of robots

Robotics, Coding


9 & above Years


30 min

Robot & Accessories Needed

Phiro Pro robot

  • step1
  • step2
  • step3
  • step4

Understanding Scratch 4 Phiro

Scratch is a programming environment that allows you to create stories, games and animations. You can now use Scratch to connect to the physical world by programming Phiro robots.


Connect my Phiro to Scratch

  • Turn on Phiro
  • Press Phiro's Mode button till Bluetooth is enabled (Blue LED will glow in Phiro Display Panel)
  • Select Bluetooth on your computer
  • Click "Add a Bluetooth Device" option
  • Now select Phiro Bluetooth and Pair
  • (Enter Pass Code: 1234)
  • Wait for Phiro to connect with computer. Note down the Com Port when computer Bluetooth pairing with Phiro.

Connect my Phiro to Scratch

  • Download Scratch 4 Phiro on your computer
  • Open the Scratch 4 Phiro icon on your desktop
  • Choose one of the two com ports and Connect
  • Click More blocks to find Phiro blocks and check connection status.
  • If GREEN, Phiro is connected to Scratch, if RED, Phiro is not connected.
  • Also You will know Phiro is paired when both Green LED glows next to Blue LED on Phiro Display Panel)

Explore Scratch 4 Phiro Blocks

Green colour indicates that Phiro is connected to Scratch

Phiro LED Light Blocks
Left LED & Right LED
Range : 0 to 255 (0 is no light, 127 is 50% light, 255 is max light)

Phiro Motor Blocks
Left Motor & Right Motor
Range : 0 to 255 (0 is no speed, 127 is 50% speed, 255 is max speed)

Phiro Sensor Blocks
Range → 0 to 1024
Detect Black → High value
Detect White → Less value


Example Program 1

Create a program in Scratch to move Phiro forward for 1 second and stop.

Click the Green Flag and watch Phiro act out your code!

What can you make Phiro do next?