• ### Tutorial 1: Simple Unguided Motion of Robot

In this tutorial we will learn how to program the robot to run in a single direction continuously.

## Step 1: Electrical Connections

First make sure that the robot is assembled properly and all the electrical wires are connected properly. The Vin and GND should be connected to the battery and the servo motor’s two power wires should also be connected to the battery and the third wire which is the signal wire (yellow wire) can be connected to any digital pin of the Arduino. The wire connections can be seen on the diagram below:

## Step 2: Opening ArduBlock Graphical Programming Tool

ArduBlock is software tool used for graphical programming. Graphical programming is a fast, fun and easy method of developing your programs without getting in too much hassle of writing long lines of code.

Using this tool you can directly implement your algorithms by just dragging and dropping the required blocks onto the screen and connecting them appropriately. Go to your desktop and open the Arduino IDE, the following window will appear

1. Click the tools tab and click on ArduBlock.

This will open the ArduBlock software.

After clicking, the following window will appear

As you can see on the left there are many tabs like the Control, Pins, and Number Constants etc. which we will be using in order to program our robot.

## Step 3: Programming

In this step we will learn how to use ArduBlock to program our robot.

First we will make a program for the robot to move in a straight direction but first we should see how the servo motor which drives the wheels of the robot operates.

The servo rotates at an angle specified by the programmer. So for turning a single direction we can give an angle of 360 degrees for it to turn. In the case of our robot in order to make both the servos (and so both the wheels) in the same direction we will need to give 360 degrees to one and the opposite ,-360 degrees to the other.

Now let’s see how we can do this in ArduBlock. Follow the given steps:

1. First click on the ‘Pins’ tab on the left of your screen the following options will appear

2. Now drag the servo block from the ‘Pins’ tab and place it on the programming window as shown below:

As you can see the servo block has two numeric inputs, one is the number of the pin on which the servo’s signal wire (yellow wire) is attached. Now repeat this step again so that both the servos have been added. Connect the second block below the first one as shown in the image in step 3.

Make sure that the pin number given to the block for both servos is the same as the number of the digital pins of the Arduino to which the motors are connected. In this case let’s assume that they are connected to pins 1 and 2 respectively.

3. After adding both the servos give an angle of 360 degrees to the servo which drives the right wheel and -360 degrees to the left one. After this step the screen should look like this

Now if we run this program the wheels will rotate only once so in order to make them rotate continuously we need to run this program in a loop.

4. Go to the controls tab the following options will appear

5.Now drag and drop the ‘loop’ block onto the screen and connect it to the top of the first servo block. The loop block will automatically extend and cover both the blocks like shown below:

Now our programming portion is complete. Save your program.

Connect the Arduino on the robot to the USB port of your computers via the USB cables but first remove the Vin wire connected to the battery before connecting to the computer. Once connected then click on the upload button. It will take a few seconds for your program to be uploaded onto the Arduino.

After the uploading is complete remove the Arduino from the computer and reconnect the Vin to the battery. Now you robot will keep on moving in a straight line indefinitely until its battery gets drained!

Note: If the right and left servo motor connections are interchanged the robot may start to spin on the spot to correct this problem if it arises correct the connections or change the angles in your program and give opposite angles to both the servos than the previous ones.

• ### Programming the Robot

We have developed this project to teach programming to high school kids. It can be used by university students by replacing the Arduino board with something more powerful like the Raspberrry PI giving it features like openCV and python programming.

In the first version we use an open source graphical tool called ArduBlock to program the robot. This makes it easy for students to learn programming just like the learn to programs with tools like Alice and Scratch

Ardublock is a graphical programming language for Arduino. To get started with programming the robot the following steps are required.

2. Read the getting started page. (Optional)

4. Open Ardublock and start programming!

• ### Assembling the Robot

Assembling the robot requires a bit of finishing of the 3d print. The original instructions by user outcastrc on thingiverse are

1. The chassis is designed to use standard size 360 degree rotation servos. All holes are designed around 3mm screws, with most holes printed at 2.5mm so you screw directly into the plastic. 2 holes (25mm apart) are included on the front of the chassis for mounting a sensor.
2. The battery plate includes everything you need to mount a 5 AA battery inside and an arduino uno on top. The plate also includes 2 holes on each side set 25mm apart to add sensor modules as needed. Smaller packs could be used with a piece of foam to act as a spacer. There is 20mm between the plates.
Wheels use any standard 1.9 RC tires and bolt to the round servo horns.
The castor is designed around a front tire from a micro RS4. It uses 4x8mm bearings for the wheel as well as the pivot. Black electrical tape could be used as well to create a tire for the wheel. I use 4mm stepped bushings in the bearings so I can use 3mm screws. An adaptor is included to add a sensor module to the back of the chassis if needed.
3. A stand is also included for storing / working on your programming. It keeps the tires slightly off the ground.

The complete instructions on assembling the robot are in the instructions section of this project.