Movement
Invent Logo

Welcome to Invent! You're using a miniature robot that's quite advanced. You can program it using drag-and-drop blocks but you can also use languages like Python which are used by professional programmers and engineers.

Invent can be connected over WiFi, and has rechargeable batteries. On the main robot board is also a pushbutton, two color-controllable LEDs (lights) and a speaker.

It has two super-accurate motors that can move in precise steps and even a pen holder to allow it to draw pictures. There are connectors at the front to allow different modules to be connected. Here we've connected two 'eyes' that can detect obstacles. There's also a sensor that can detect and follow lines.

Movement
The remote

Invent! can also be remote-controlled. If you have a remote you can use it to move the robot around but also do all sorts of other things. The remote is a complete programmable computer by itself so you can write programs for the remote as well as programs for the robot itself, to allow the two to communicate.

The remote
Assembling the robot

First attach the drive module to the main board. You need to align the two black connectors on the main board with sockets on the drive module.

Assembling the robot
Connecting the drive module

Press down on both sides to connect the two modules.

Connecting the drive module
Attaching the magnet

Now turn the robot upside down. Attach the magnet module by aligning the pins on the plugs with the sockets under the main board.

Attaching the magnet
Take care ...

Take care that all four pins on each plug go into the sockets underneath.

Take care ...
The finished robot

When it's fully pushed-in, it will look like this.

The finished robot
Powering up

Turn the robot on by sliding the power switch towards the 'On' position. You should see some lights turn on:

  • The white light labelled 'PWR' should now be on
  • The red 'LOW' light will turn on when your battery needs to be recharged
  • The yellow 'CHRG' light will turn on when you are charging the battery using a USB cable

The 'STAT' light is the one to look at now. It shows the status of how the robot is connected to the WiFi. If it goes red and then green, then go to the next step. If it goes blue, then skip ahead to 'Access point mode'.

Powering up
Connecting using a WiFi network

If the light turns red, the robot is trying to connect to a WiFi network. If it's successful, it should turn green within a few seconds.

If the light stays red, the robot can't connect to the WiFi. This is most likely because it hasn't been set up with the correct WiFi name and password.

If your light is now green, proceed with the next step. If the light is blue instead, jump ahead to the 'Blue light' step below.

Connecting using a WiFi network
Getting the robot's address

Look closely at the label on your robot. It has two 6-character codes. You'll need to enter the bottom code (the one in bold) in the next step. It doesn't matter whether you type it in uppercase or lowercase. The characters will only consist of the numbers 0 to 9 and the letters a to f. (So if you see a '0' it will be the zero digit not a letter 'O').

For our robot, we'll need to use the code 'fd62ec' in the next step.

Getting the robot's address
Connecting

Go to the website http://code.inventblocks.com/ui/ and click on the WiFi icon shown.

Connecting
Entering the address

Enter the bold code from the label in the 'Address' box and then click the 'Network' button.

Note: Using the https URL will only provide the option of a serial connection. Use the https link if you are connecting to your robot using wifi.

Here are the two versions of the link:

https://code.inventblocks.com/ui/

http://code.inventblocks.com/ui/

Entering the address
Success

After a few seconds the connect icon shown should go solid blue and look like the cables are connected. If it looks like the screen shown, your robot has connected. If it stays black and looks disconnected, there has been a problem. In this case, you should:

  • Check your robot has connected to the WiFi (the green light is on)
  • Check your computer is connected to the same WiFi network
  • Check you have entered the robot's code correctly in the previous step

If your robot connected properly, now skip forward to 'First Steps'.

Success
Access point mode

If your light when red/green and you've connected to your robot, skip ahead to 'First Steps'.

If your light turned blue instead, then your robot is in access point mode. This means that it has created it's own WiFi network that you can connect to. In this case, you first need to check the label and look at the 6 character code in bold. Your robot should create a network with the name 'InventXXXXXX' where the 'X' characters are replaced with your robot's code.

Go to your network settings and connect to this access point before proceeding.

Access point mode
Connecting

Go to the website http://code.inventblocks.com/ui/ and click on the WiFi icon shown.

Note: If you use https in the URL you will only have the option of a serial connection to your robot.

Connecting
Clicking the network button

Make sure that the 'Address' box is empty, and then click the 'Network' button.

N.B. We're not entering an address here as we're connected to the WiFi network the robot itself has created, so there's only one robot that it's possible to connect to.

Clicking the network button
Success

After a few seconds the connect icon shown should go solid blue and look like the cables are connected. If it looks like the screen shown, your robot has connected. If it stays black and looks disconnected, there has been a problem. In this case, you should:

  • Check your robot has created it's own WiFi network (the blue light is on)
  • Check your computer is connected to that same WiFi network (it will be identified by your robot's code)
  • Check the 'Address' box was left empty in the previous step

If your robot connected properly, now proceed to 'First Steps'.

Success
First steps

Click on the 'Invent!' menu on the left to access the blocks we'll need to control our robot, and drag a 'Move 5cm wait' block to the right where there is some empty space.

First steps
Running your code

Now press the play button shown. Your robot should now move forward 5cm and stop!

Running your code
Rescue the astronaut

Now you've got your robot moving, it's time for your first challenge. Your robot is on Mars and it's trying to rescue a lost astronaut. We've got a small 'Mars' here but you might have a larger one.

You'll need to go forward, turn around and go back to where you started to complete the challenge. If you're successful you'll collect the astronaut using the magnet on the front of your robot!

We're not giving to give you any more clues here - we're sure you can find the commands you need to complete the task ... good luck!

Rescue the astronaut
Saving your work

Once you've completed this challenge, and every time you write a new program make sure you save your work. You'll have been told by your teacher where to save your work. Use the save icon at the top of the screen and give each program a sensible name like 'Tom Astronaut Rescue'.

N.B. If this doesn't seem to work, check the information in the next step ("Download Issues").

When you are ready to write a new programme, you can drag and drop your code onto the bin icon at the bottom left.

Make sure from now on you save your work regularly and at least once for each challenge. Some of the later challenges will be much easier if you can re-use some of your code from the earlier ones!

Saving your work
Download issues

On some browsers downloads from the code.inventblocks.com site might be blocked by default and you may need to explicitly tell your browser to keep your download. On Chrome the warning looks like this - you need to click the 'Keep' button to save the download.

Download issues
Move in a square

Your next challenge is to move your robot in a perfect square. You'll want to go forward, turn 90 degrees, go forward again, turn 90 degrees again, and repeat this process another two times.

Move in a square
Loops

If you did the previous challenge using 7 or 8 code blocks, there's a simpler way of doing it! Go to the 'Loops' section, and drag a 'Repeat 10 times' block into your code as shown.

Now:

  • Change the '10' to '4'
  • Drag inside your 'Repeat' block one of the move blocks and one of the turn blocks
  • Make sure you delete any unused blocks by dragging them to the bin icon

When you press the play button again, hopefully your robot will do the same movements but your code is much shorter and easier to understand. This is the magic of loops!

Loops
Multiple squares

Can you now get your robot to go around a square 10 times?

Hint: You could just increase the number of times you moved forwards and turned. Alternatively, you could use two separate loops. An outer one that repeated 10 times, and one inside it that repeated 4 times to make the square movement.

Hint 2: If your robot starts to move away from a perfect square after going around a couple of times, you might want to change the turn amount very slightly. It could be that you need to tell your robot to move slightly less than 90 degrees (or slightly more).

Rescue mission

Your next challenge is to rescue the astronaut again, but this time to move around the outside of the planet.

Hint: You'll need to do lots of little moves and little turns to succeed. You'll have to do all of these moves inside a loop. It's up to you to work out how many times through the loop you need to go, and how far each movement and turn needs to be to follow the curve of the outside of the planet as closely as possible.

Rescue mission
Mine sweeper

Your next challenge is to create a minesweeping robot. You may be using an activity mat like the one shown, or your teacher might create an arena using other objects or markings. If you're using the mat shown here, we're really just interested in the large circular dashed line. Your robot must start outside of this line and collect the 10 'mines' that are randomly scattered inside this line. The 'mines' are small objects that get picked up by a magnet and can include things like coins, stell washers, or small nuts and bolts.

Your challenge is to collect as many mines in the shortest possible time. Read the next couple of steps to find out the rules and some tips ...

Mine sweeper
Rules
  • You can stop collecting at any time, but any mines left will result in a 10 second time penalty added to your time
  • Your robot can drive outside the central circle, but not outside the outer arena rectangle
Tips 1

There are two things you will need to consider to be as successful as possible:

First is the ALGORITHM your robot uses is important. This is the process your program follows. For example, you might want to cover all of the area like you would mow a lawn - by moving in long lines, and then turning around at the end of every line. But you might be able to think of a better strategy.

Read on for some more tips ...

Tips 2

The second thing you can change is the HARDWARE design of your robot. Although you can't change the basic robot and the magnet, if your class set has some technical Lego, you can use it to make some add-ons. The two blocks at the front of your robot can accept Lego pins - once these are inserted you can then attach other Lego pieces. The picture here shows some ideas for robot football (which will be a future challenge), but you'll need to create something that works best for your 'mines' which will be much smaller and lower than the 'football' shown here.

If you don't have access to Lego, you can make something out of paper (or thin card) and sticky tape that you can attach to the front of your robot. Read on for the last set of tips ...

Tips 2
Tips 3

If you are making some sort of hardware addition to your robot, think what you are trying to accomplish. You probably want to 'funnel' the mines towards the magnet where they will be collected.

One final tip: if you are using Lego, there are some 'pins' that are designed to allow parts to freely pivot. You might find these useful as it might help in allowing your 'funnel' mechanism to drop closer towards the floor. Your mechanism will need to be fairly low to not move over the top of the mines rather than collecting them!