Get started
- Controls
- Using Blockly
- Using sensor values
Controls
To move the robot, use the WASD or arrow keys, alternatively, you may use a controller joystick or tap the movement keys on the game screen. You can tap the camera icon to toggle between fixed and free camera. Use the Q and E keys to rotate the camera around Turtlebot.
Using Blockly
"Blockly is a library that adds a visual code editor to web and mobile apps. The Blockly editor uses interlocking, graphical blocks to represent code concepts like variables, logical expressions, loops, and more. It allows users to apply programming principles without having to worry about syntax or the intimidation of a blinking cursor on the command line." - Google
To start using Blockly, tap on the tabs located in the upper right to open a tab containing individual Blockly blocks. Each tab contains blocks that may be dragged onto the Blockly canvas and combined with additional blocks to form an expression.
Clicking the "Run ▶" button will execute the code inside the Blockly canvas.
Using sensor values
Turtlebot (the robot above) is currently equipped with 6 sensors for detecting distance; the sensor value increases the further away a physical object is detected, and decreases the closer an object is detected. To test this, drive Turtlebot close to a wall and observe the colour-coded sensor value shown at the top-left of the screen adjust.
You can manipulate Turtlebot using the sensor values by placing the sensor block onto the Blockly canvas. This represents the current value of the sensor at the moment the code is executed.
The blocks above will result in code that affects Turtlebot's behaviour. In this case, once run, Turtlebot will drive forward until both its front green sensors detect an object within a distance measured as 1. Following that, it will turn 180 degrees and continue to drive forward.