robotic control

Control your robot using Google Blockly and make it to follow precise commands

google blockly

WHAT:

This challenge aims to show how a robot responds to sequential commands. Teach it how to follow your orders and behave accordingly.

Lets start with an example: We have created a very simple circuit for the B-robot placing 4 traffic cones forming an square of 40×40 cms. See image below (left side).

Now, we want the robot to move around the cones leaving all of them on its left (and not touching them on its way). If we want the B-robot to advance we can use the Google Blockly command “MOVE FORWARD” + 60 CM. To turn: “TURN LEFT” + degress 90º. You can connect as many blocks as you want creating a sequence. See below, the intended route path (left) for the B-robot and the final command sequence (right side on the image) created for Google Blockly to complete a full lap. Easy!

example 1 1

Left: the intended path for the robot to follow
Right: the command sequence in Google Blockly

Let´s move forward and make the B-robot to repeat the sequence 10 times:

  1. Go to the Blockly´s left MENU and click on “Loops“, then grab and drop the REPEAT “3” times block and place it on top of the previously created command sequence as indicated below. Done! Now, the robot will repeat 3 times the same sequence.
  2. Remember to send the commands to be executed by the B-robot clicking on the PLAY symbol on the upper right corner.Loops

 

 

How to control the B-robot with Google Blockly?

Steps:

  1. Turn ON your B-robot EVO
  2. Connect your computer´s WIFI to the B-robot´s WIFI (named JJROBOTS_XX) using the default password: 87654321

WIFI connection

2. Download from GITHUB or from here the APP. Extract everything to a folder and launch BROBOT_Blockly.exe. Your default internet browser will open a webpage like the one displayed below (and a system windows indicating all the connection info in real time)

windows

3.) Now you are ready to send commands to your B-robot 🙂 Try first with something like:

spinning

Drag and drop the block shown above and click on the RUN button. The B-robot will rotate 360º to the right and stand “still” after waiting for new commands

 

Robotic Challenges STEM

Find below some challenges to beat with the B-robot. Feel free to modify them as much as you want (there are no distances indicated anywhere so the overall dimension it is up to you!) but the tips provided will work for the shapes indicated below. The traffic cone 3D model can be found here.

challenge 2

Make a lap around the cones not touching any!

Place the traffic cones as indicated above (more or less). You have to complete a Lap not touching the cones.

Depending on the size of the hexagon and how good it was drawn the turn on the corners might vary. If you are having difficulties finishing the lap, reduce the overall dimension of the circuit.

challenge 2 TIP

NOTE: If there is any misalignment or small leverage offset on the B-robot´s wheels (the wheel´s hub have to be perfectly fit into the stepper motor axis and free of any plastic obstruction), the robot can suffer lack of accuracy when moving. Try to adjust the wheels or reduce the diameter of the hexagon in order to solve it.

 

 

drop the pencil

Move the B-robot and drop the pencil using the robot arm. After that, move back to the original location. 

Use a long pencil or stick as barrier (The B-robot should have enough clearance to move through easily) . Use four cones (2+2) to hold the “barrier” at the right height. Start moving the robot and once it is in front of the barrier, lower its arm and knock it down! afterwards, go back to the starting position.

A google blockly code like this will work, but of course, it will depend on the size of the circuit.

challenge 3 TIP

NOTE: If there is any misalignment or small leverage offset on the B-robot´s wheels (the wheel´s hub have to be perfectly fit into the stepper motor axis and free of any plastic obstruction), the robot can suffer lack of accuracy when moving. Try to adjust the wheels or reduce the diameter of the hexagon in order to solve it.