RobotMagic Manual Version 1.6


RobotMagic

Manual



Table of contents

Overview: Learning STEM in Virtual Worlds

Getting Started

Editor

My Workbook

Worlds

Lego NXT

Arduino

Aseba Thymio Robot

Gears

Dancer

3D Printer

Draw

Spider

Space

Hanoi Towers

Tic Tac Toe

Chemistry

Biology

Scribbler Robot

Teacher Tools

Overview

Classes

Workbooks

Chapters

Activities

Graphs

Reference

Block Basics

Viewing Worlds

Files

Block Types

Running Programs

Edit Code

Advanced: WorldCode Parameters

Advanced Blocks

FAQ

What Browser/Device should I use?

What age is RobotMagic designed for?

What is a World?

What is a Challenge?

How do I solve a Challenge?

I have more questions...


Overview: Learning STEM in Virtual Worlds

Parents have been in endless efforts to get the best education for their children. In a modern world where children are continuously interacting with pieces of technologies including computers, smartphones, and robotic toys, technologies are inseparable parts of early education. As a matter of fact, one of the best educational improvements in the last decade comes in the form of computational thinking – a combination of toys, computers, and internet to give children chance to visualize ideas and develop creativity.

Computational thinking is a broad term; for most people, it is practised when they learn how to code software. For children, however, the meaning has to be narrowed down without actually eliminating any step in the learning process. Computational thinking involves creating a program, letting it run, encountering problems, and finding solution to solve them. To implement such an education process for children, RobotMagic has come up with a simple yet brilliant solution. It is an online service that revolves around 3D robotic environments where children can control animated robots.

Each of the commands can be immediately visualized, allowing children to see their ideas and develop creativity further as they improve. The command sequence progressively becomes more complex as the children's skill improves. For children between 10 and 16 years old, this is a terrific and exciting as well as challenging tool. It is like a game where children can see immediate results of actions via an interactive gameplay. However, describing it as a game is an underestimation because the entire commands revolve around STEM (Science, Technology, Engineering, and Math) subjects. As learners progress, they will see and learn about more complicated problem-solving activities designed to challenge their creative thinking.

Top features of RobotMagic include:

RobotMagic is a solution which combines advanced technologies familiar with children and modern learning process. Robots are naturally appealing for children, but not every parent can afford expensive robotic toys for their kids. RobotMagic provides an easier way to allow children develop critical thinking and interact with STEM-based virtual robotic environment in much more affordable package.


Getting Started

 It's easy to get started with RobotMagic- just open a browser to

http://robotmagic.org

Click on “Start Creating” to enter a “RobotMagic World” with your first simple challenge.

The challenge starts by displaying instructions in the top right. “Help” content is available at the bottom left.

Editor

The right side of the challenge shows the block editor. Beginner challenges are like puzzles- drag the blocks so they fit together to solve the challenge by creating a program. Click the “start” block to run your program.

The left side of the challenge shows a robot world in this case a dancingrobot. You can change the 3D view of the robot world by dragging the robot view with your mouse.


Courses

Once you've finished an activity you can continue to the next one! Activities are grouped into lessons which are grouped into a course.  Teachers can customize courses with the Teacher Dashboard. As students complete activities they earn stars.  Click on the “more” link to review activities you’ve already completed.

Files

http://robotmagic.org/magic/files

RobotMagic files are stored in the cloud and can be easily accessed on all devices.  Files you save in the editor by clicking the “Save As” button appear in the “Files” tab.  From here you can open any of them or delete them.  


Gallery

http://robotmagic.org/gallery

The Gallery organizes shared files from other people into tabs: Featured, Recent, My Shared Files and My Likes.  Click on any file to edit and run it.  You can save edited gallery files to your Files if you like.  Click the “Share” button in the editor to share your work with others, on the gallery it will appear in the “Recent” tab.  If the staff likes your work, it’ll appear in the “Featured” tab.

Worlds

Lego NXT

Program a real or simulated NXT robot with blocks or Javascript to solve fun challenges. Supports standard sensors and actuators. Combine multiple robots and 3D content for even more fun!  

NXT Basic Blocks:

You can find these “basic” blocks in the “Basics” category in the NXT world.  They’re designed to quickly and easily get you started.  The blocks on the left are “event” blocks, the ones on the right are “actions”.  Combine an “event” with one or more “actions” to program your NXT.  Change what a block does by clicking or dragging the “red” control.  

Event blocks that use NXT sensors require you to configure which port (P1..P4) the sensor is connected to.  Blocks dealing with robot motion assume that the NXT uses 2 motors to drive the robot, the left motor on port B, the right on port C.  If your robot is not going the right distance or turning the right amount, see “NXT Drive Calibration” below.

In the simulation, configure your robot with the right sensors using the “world/add sensor” block and optionally position your sensor with “world/move” and “world/rotate” blocks.

Events                           Actions               (Event description)                (Action description)

React to a button push                Set Motor speeds

React to a “touch” sensor        Wait some time

React to a “sound”                Turn the robot left/right

React with “ultrasound”                Move fore/back

React to “light” sensor

NXT Text Blocks

You can find these blocks in the “Robot” section:

NXT Drive Calibration

The RobotMagic movement blocks (move, turn and arc) are calibrated for the standard wheeled robot.  If yours doesn’t move the right distance or turn correctly, use the “robot/calibrate” block to adjust the gains.  The 4 numbers affect how far the robot moves, turns, moves while arcing and turns while arcing.  Bigger numbers will make the robot go further.  The best approach is to tweak the numbers and try them out.

NXT Linking (Using RobotMagic with a real NXT)

You can program the simulated NXT robot in your browser without any preparation.  

To use RobotMagic with a real NXT you’ll need to install some software drivers on your computer by following these instructions: http://robotmagic.org/media/drivers.html

Once the drivers are installed and your robot is connected with a USB cable, press the “Link” button to load a program to your robot.  Pressing “Run” while “linked” will run your programs on the real robot.  Press “Unlink” to resume programming with the simulator.  You can remove the USB cable once your robot has been programmed.  You can use the “robot/serial” blocks to control your robot and display data.

Aseba Thymio Robot

Program a real or simulated Thymio robot with blocks or Javascript to solve fun challenges. Support for sensors, leds, sounds and moving. Combine multiple robots and 3D content for even more fun!


Thymio Basic Blocks

You can find these “basic” blocks in the “Basics” category in the Thymio world.  They’re designed to quickly and easily get you started.  The blocks on the left are “event” blocks, the ones on the right are “actions”.  Combine an “event” with one or more “actions” to program your Thymio.  Change what a block does by clicking or dragging the “red” control.  

Events               Actions               (Event description)        (Action description)

React to a button                Set the motor speed

React to a tap                Play 6 music tones

React to a sound                Set the top color

React to an obstacle        Set the bottom color

(gray=don’t care

 red=obstacle

 blue=no obstacle)

React to a line                Wait some time

(gray=don’t care

 white=see white

 black=see black)

React to sideways tilt        Turn left or right

React to forward tilt        Move forward/backwards

Thymio Text Blocks

You can find these blocks in the “Robot” section:

Thymio Linking (Using RobotMagic with a real Thymio)

You can program the simulated Thymio robot in your browser without any preparation.  

To use RobotMagic with a real Thymio you’ll need to install some software drivers on your computer by following these instructions: http://robotmagic.org/media/drivers.html

Once the drivers are installed and your robot is connected with a USB cable, press the “Link” button to load a program to your robot.  Pressing “Run” while “linked” will run your programs on the real robot.  Press “Unlink” to resume programming with the simulator.  You can remove the USB cable once your robot has been programmed.  You can use the “robot/serial” blocks to control your robot and display data.

Arduino

Program a real or simulated Arduino with blocks or Javascript to create interactive electronic objects. Build projects with sensors, servos, lights and more. Supports Arduino libraries.

Arduino Linking (Using RobotMagic with a real Arduino)

You can program the simulated Arduino in your browser without any preparation.  

To use RobotMagic with a real Arduino you’ll need to install some software drivers on your computer by following these instructions: http://robotmagic.org/media/drivers.html

Once the drivers are installed and your Arduino is connected with a USB cable, press the “Link” button to load a program to your board.  Pressing “Run” while “linked” will run your programs on the real board.  Press “Unlink” to resume programming with the simulator.  You can remove the USB cable once your board has been programmed.  You can use the “robot/serial” blocks to control your board and display data.

Gears

Design mechanical contraptions and bring them to life: clocks, differentials, analog computers. Use math and critical thinking to solve engineering problems with different sized gears, motors and more.

Dancer

Bring a doll to life! Shape and pose a human figure however you want and then animate it to create realistic movements like dance, sports and more. Achieve realistic movements by coordinating joints.

3D Printer

Make anything you want! Construct colorful objects in your browser and watch the 3D printer as it builds what you designed in seconds.

Draw

Teach a robot to draw! Learn to program with blocks and Javascript by teaching a robot to draw using simple commands.

Spider

Teach a robot spider to navigate its world. Coordinate how it moves by programming leg movement sequences with blocks and Javascript.

Space

Save an astronaut by controlling his motion with rocket thrusters! Experiment with orbital mechanics and physics to solve challenges seen in the movie: "The Martian".

Hanoi Towers

Guide a robot to solve a mathematical logic puzzle. The object of the game is to move all disks to another tower while always keeping smaller disks on top of larger disks. Learn about advanced computer science concepts like recursion.

Tic Tac Toe

Program 2 robots to play the old-fashioned logic game against each other, yourself, your friends, or other robots. Make your robots play a smarter, more strategic game using artificial intelligence.

Chemistry

Explore exciting practical experiments that demonstrate chemical concepts and processes. Interact with experiment simulations to learn more effectively. Design your own experiments.

Biology

Explore biology concepts by creating simulated 3D structures and walking through them. Take advantage of your brain's ability to navigate to memorize difficult concepts.

Scribbler Robot

Program a real or simulated Scribbler robot with blocks or Javascript to solve fun challenges. Support for sensors, leds, sounds and moving. Combine multiple robots and 3D content for even more fun!

Scribbler Linking (Using RobotMagic with a real Scribbler)

You can program the simulated Scribbler robot in your browser without any preparation.  

To use RobotMagic with a real Scribbler you’ll need to install some software drivers on your computer by following these instructions: http://robotmagic.org/media/drivers.html

Once the drivers are installed and your robot is connected with a USB cable, press the “Link” button to load a program to your robot.  Pressing “Run” while “linked” will run your programs on the real robot.  Press “Unlink” to resume programming with the simulator.  You can remove the USB cable once your robot has been programmed.  You can use the “robot/serial” blocks to control your robot and display data.

Teacher Tools

Overview

RobotMagic combines an innovative 3D environment with an advanced online learning system to improve STEM education. With this online learning system, teachers can set up personalized courses for their students and track their progress.  Interactive lessons and activities can be used as is, customized, or created from scratch. Student achievement is continually tracked and can be analyzed using graphs or exported to other systems.

Courses

Course enrollment is made simple by letting students register using course codes. Students can switch between multiple courses. Teachers have powerful tools to manage and analyze their courses.

Students work through a course at their own pace to optimize STEM learning. Progress is tracked and students are guided to success with badges, leaderboards and points. Teachers can manage course content by selecting from existing lessons, customizing them, or creating their own.

Lessons

Lessons organize educational content for student success. You can reuse existing lessons or adapt/create content with our powerful browser-based tool that lets you easily arrange videos, quizzes, RobotMagic activities, and text content on individually personalized pages.

Activities

RobotMagic activities are interactive, guided challenges that teach students STEM skills. Students are guided by a series of prompts toward success. They can access hints and demonstrations on how to complete actions. Teachers can create these activities using our online tool or reuse/adapt existing content.

Graphs

Intuitive graphs help teachers understand their student's learning progress. Teachers can drill down from a class overview to students or activities and to particular skills.


Reference

Editing Blocks

Connect blocks to the “Start” block to run them when you click the “Start” block. Change a block's behavior by clicking on its lighter areas. Arrow #1 shows the list of shapes available when clicking on “pyramid” area.

Make a block inactive by dragging it away from the "Start" block . Arrow #2 shows the “scale” block disconnected from the “Start” block - it will not run when you click the “Start” block.

More blocks are available in library on left side. You can drag them back there too to keep your worksheet tidy. Arrow #3 shows the library, drag blocks from here to use them)

Viewing Worlds

Files

When you click on a workbook activity, your progress will be saved automatically.  Just return to the activity at a later date and you’ll continue where you left of. If you want to save a file to your gallery click the “SaveAs” button and give the file a name.  Once you’ve named it, it too will automatically save any progress.  You’ll find your saved files in the “Files” section.

You can open a copy of someone else’s file in your browser if they’ve shared the file on the Gallery, social media, or given you the file’s URL.  You can “Run” the copy  and make changes to it, but you’ll need to click “Save As” to save the file to your Gallery if you want to keep your progress.

Block Types

Start the program. Click this block to run your program:

Action blocks do what they say, they “add a red cube” or “wait for half a second”. Change what they do by clicking on the lighter areas or swapping out the inner value block.

Value blocks pass a value to another blocks, notice how you can combine them like the “square root 4” example.

Logic blocks change the flow of your program based on the top value block which is the “condition”. You can combine logic blocks to create complex conditions.

Loop blocks repeat actions a number of times.

Variables give a name to a value. You can then use the name in place of the value.

Procedure blocks give a name to an action and are used like action blocks- in this case “procedureA”. You can use the “procedureA” block in place of action blocks you named. Click the star icon to pass values to variables with parameters.

Function blocks are procedures that return values and are used like value blocks. Name your actions that return a value- in this case “functionA” and then use the “functionA” block as a value block.

Basic Blocks are “visual” blocks in selected worlds (Thymio, NXT, Arduino and Scribbler) that make it easy to get started.  They come in event and action flavors. You can mix basic blocks with normal blocks.  Configure Basic blocks by clicking or dragging the “red” items.  

In the following example, the robot will turn right when the right button is pressed.  To make the robot turn left when the left button is pressed, you would click the “left” triangle on the “button” event block and drag the turn indicator in the “turn” action block to the left side.

Running Programs

Click the “Start” block to start running your program. Blocks connected to the “Start” block will run when it's their turn.

Besides clicking on the “Start” block, you can also click the “Play, Pause, and Stop” icons on the toolbar under the robot view

Clicking the “Play” button does the same as clicking the “start” block- you'll make more use of it when you're editing text code.

To stop your program press the “Stop” icon button.

Normally your program will run each block as quickly as it can. To help you understand what your program and robot are doing, you can step code one block at a time using the “Step” button. Click the “Step” button to start a program in step mode or even interrupt a running program. Press “Play” to continue running your program

Editing Javascript Code

RobotMagic starts with blocks to control robots. Once you've got the hang of using blocks, you can click the “Code” button in the top toolbar to edit code in the built-in code editor:

Once “Edit Code” is clicked, the screen looks like this:

You can return to editing blocks by pressing the “Blocks” button.

Notice that not much has changed- you can still do all the things you could in “Block” mode. What has changed, is that you're now editing the complete code that is run when you press “Play” (the code is in JavaScript which is well documented online and in many books)

Let's look at the text editor below the button bar. On the left are the line numbers which you'll use to reference specific lines of code. On the right is code which is organized into 3 sections: WorldCode, MyCode and BlockCode. You'll begin by briefly exploring the “BlockCode” section and then spend most of your time with “MyCode”.

The “BlockCode” section is generated from your block program when you click the “Edit Code” button. Notice that line 17 contains the text “circle(50,50,50)” which is the translation of the “draw circle” block. You can click the “Run” button and the code program will run the same as the block program. Try changing the code and running the result.

Changing the text in the “BlockCode” section will not change the blocks in your block program.  This means that when you click “Blocks” the blocks will be the same as when you left them.  This allows you to try all sorts of things in the code mode because you can return to a working block program at any time.  If you do want to recover edits that you’ve made to the “BlockCode” section after you’ve returned from the “Block” view, you can click the message at the start of the “BlockCode” section as illustrated:

Now, use the “MyCode” section to make blocks for the MyBlocks section of the block library section with code functions. Changes within this section will be saved within your file. Let's write our first function which will simply return the number 2. We'll call it the function “two”.

Look at lines 6,7 and 8, they contain new code to create the “two” function. Now look at line 11 where the “two” function is used as the last argument for the “astro.fire” function. Running this program will fire the thruster for 2 seconds.

Besides using the “two” function in code, you can also use it as a block. Return to the “Block” view by pressing the “Edit Blocks” button and then use the “two” block found in the “MyBlocks” section of the library:

By default, RobotMagic will fold away the “WorldCode” section, this code comes with each world and defines what some robot blocks do- you can look at this code but you can't change it. To unfold and refold the WorldCode section click on the triangle on the right side of the line number that starts a folded section.

Here's a table that reviews the 3 code sections:

                        

                        

                

        WorldCode

                

                        

MyCode

                        

BlockCode        

                        

Purpose

                

        

Makes this world run

                

                        

Make blocks for the MyBlocks library

                

                        

Code from block program

                

                        

Can I make changes here?

                

No

                

                        

Yes

                

                        

Yes

                

                        

Will my changes be saved?

                

                No

                

                        

Yes

                

                        

No, but you can recover them when switch back to “Code”

                

You can pause your program when it reaches a certain line by setting a “breakpoint” on that line. Set or unset a breakpoint by clicking to left of line number. Once your program has paused you can click the “Run” button to start running again or the “Step Code” button to only run one line of code at a time. You can use as many breakpoints as you want.

Advanced: WorldCode Parameters

You can provide configuration strings to WorldCode functions to configure the parameter fields for the function:

Configuration strings are combined with commas into one string.  For example the string for the following block is: ”'@color:#ff0000,type(LED servo speaker),"cfg=i25"

FAQ

Please view the FAQ here: http://robotmagic.org/blog/faq

I have more questions...

Please contact us here: http://robotmagic.org/contact

RobotMagic: Learn by Doing! http://robotmagic.org