HA Basic robotics @ WCPL

Table of contents

Download WCPL's “Getting Started in Robotics” guidebook.
WCPL's “Getting Started in Robotics” guidebook is included in the Finch kits.

What are robots?

An entryway to a building.
Where's the robot? Original photo by Mannie104; resized here.

Odds are that you have more experience working with robots than you realize! Wikipedia tells us that a robot is "a mechanical or virtual artificial agent, usually an electro-mechanical machine that is guided by a computer program or electronic circuitry. Robots can be autonomous or semi-autonomous..." Read more about robots at Wikipedia.

Let's take a look at a few important words in that definition of "robot".

From this perspective, many things described as "automatic" could be considered robots. Robots don't need to look human or exhibit signs of advanced artificial intelligence. However, there is no consensus definition of the term "robot".

Virtual robots

WCPL's Technology department has created a virtual robot to help you learn more about robotics. These virtual robots are created using Scratch, "a programming language and online community where you can create your own interactive stories, games, and animations". We call this virtual robot the "Sparrow", inspired by the electromechanical Finch robot.

Sparrow: Manual Control

The gameboard from "Sparrow: Manual Control".

In Sparrow: Manual Control the Sparrow's motor ability has been wired to the arrow keys on your keyboard. Pressing ↑ sends a signal to the Sparrow, telling it to go forward. Pressing ↓ tells the Sparrow to go backward. Pressing → rotates the Sparrow clockwise (i.e., ↻), and pressing ← rotates it counterclockwise (i.e., ↺).

Sparrow: Control Tower

The gameboard from "Sparrow: Control Tower".

Sparrow: Control Tower presents you with a different model of control. Rather than finding the Sparrow pre-wired to buttons on your keyboard, you're sitting in a control tower capable of sending and receiving signals between the Sparrow and yourself. The Sparrow understands the following messages:

The Sparrow can send one signal back to the control tower:

With this knowledge, you have to create a control system in the tower to direct the Sparrow to its goal. Unlike "Manual Control", no keyboard buttons are prewired to send the Sparrow commands. To get the Sparrow to do anything at all, you have to click the button that says "See Inside" and design a control system using Scratch.

Wiring buttons in the control tower

A screenshot of a successfully wired control button.
The two blocks above connect the keyboard's ↑ key to the control tower's fwd broadcast. The Sparrow, upon receiving this broadcast from the tower, will attempt to move forward 1 step.

To begin recreating the controls of the first Sparrow:

  1. First click Events in the middle column. It's next to Motion.
  2. You can use the block that says "when space ▼ key pressed" to define what happens when a keyboard button is pressed. Drag it into the work area on the right side of the screen.
  3. Click ▼ on that block and choose "up arrow".
  4. You can use the
		block that says "broadcast bwd ▼" to send signals to the Sparrow. Drag it into the work area and place it beneath and connecting it to the "key pressed" button.
  5. Click ▼ on that block and choose "fwd".

Now press the ↑ key on your keyboard. The Sparrow should move forward a step.

Automation with the control tower

The control tower is much more powerful than that though. You can use it to completely automate the Sparrow's movement. Read more about automation at Wikipedia. Check out the blocks in Control to explore this possibility.

You could, for example, put the block that says "broadcast fwd ▼" inside the "forever" block. Then connect the 'when Flag clicked' block to the top of that combination. Then when you press the Flag button, the control tower would broadcast the fwd signal again and again forever. But that probably wouldn't get the Sparrow to its goal — maybe you can come up with a better set of instructions.

Sparrow: Control Tower (Intermediate)

The gameboard from "Sparrow: Control Tower".

Sparrow: Control Tower (Intermediate) is based on the previous Control Tower game. This time, however, alien overlords change the shape of the course at the beginning and they don't turn the Sparrow on until the course stops changing. The time it takes for the course to change is random, so the alien overlords have to send a go message to the Sparrow to turn it on.

Can you design a control system in your Tower that directs the Sparrow to its goal every time the Flag button is pressed?

The Finch

The Finch robot.

The Finch, like the Sparrow virtual robot, can also be controlled with your computer using Scratch. The Finch can receive movement-related commands. Additionally, you can tell it

Unlike the Sparrow, the mechanical Finch won't send you a message indicating a collision. However, it does have a variety of sensors and can send you messages related to the following:

The Finch also has a 3-axis accelerometer, which lets the Finch "detect the direction of gravity, so as to know how the Finch is oriented (flat on the ground, upright, etc)." Read the official documentation to learn more about the Finch's hardware.

Home use

Patrons of Creston, Dalton, Doylestown, Rittman, West Salem, and Wooster libraries are able to check out a Finch robot for use at home or in the classroom. Please ask a librarian for details. Each Finch robot comes with a printed copy of WCPL's "Getting Started in Robotics" and a 15' USB A/B cable for connecting the Finch to your computer.

Connecting the Finch

To use the Finch, you must connect it to your PC using the USB cable included in the kit. The USB cable has an A connector and a B connector. The B connector looks more like a square than the other connector and plugs into the Finch robot. The A connector looks like a narrow rectangle and plugs into your PC. Both connectors are shaped so that they fit into their respective ports a certain way, so try rotating the connector if it doesn't go into the port.

Step 1: Take the B end of the cable.
(Pictured)
Step 2: Insert the B connector into the Finch's USB port.
(Pictured)
Step 3: Take the A end of the cable.
(Pictured)
Step 4: Insert the A connector into the PC's USB port.
(Pictured)

Required software

Snap!

The Finch can be programmed using several programming languages, but for people new to computer programming, we recommend using the Snap! environment. Snap! is based on Scratch, and it's what we use to control the Finch in our "Basic Robotics" classes.

Snap! requires the Java Runtime Environment. If you don't have it installed on your computer already, you may need to download it from Oracle.* Be careful during installation though. Like a lot of sotware you download from the Web, Oracle's JRE installer might ask your permission to install additional, unnecessary, and unwanted software on your computer. If you see a checkbox, make sure you know what it does before clicking "OK" or "Next"!

* Microsoft Windows users can install Oracle's JRE using Ninite, which will not ask you to install unnecessary software. In most cases, users of GNU/Linux should install software from their distribution's repositories using the package manager, not using files downloaded from the Web.

After the JRE has been installed on your computer, you need to download and install the BirdBrain Robot Server from the official Finch website. After you do that, look for "BirdBrain Robot Server" on your desktop and start it. If the Finch is connected to your computer, the BBRS should be able to detect it. Click the "Snap!" button to launch the Snap! programming environment. Consult the official documentation for information about programming the Finch in Snap!

Scratch

The Finch can also be programmed using the Scratch Offline Editor. We have not experimented much with this, so you'll need to consult the official documentation.

More about Scratch

We used Scratch, created by MIT Media Lab's Lifelong Kindergarten research group, to interact with the Sparrow virtual robot. But you can do a lot more with Scratch!

Joining

Scratch has an active and kid-friendly online community. To get the best educational experience, we recommend that you show your parents or guardians the page created just for them by the Scratch team. With their permission and assistance, you can create an account. Having an account will let you ask for help on the Scratch forums and share your projects with the online community.

If you don't have Internet access or don't want to create a Scratch account, you can use the Scratch Offline Editor. This software lets you create Scratch programs without using the Scratch website and — after it's downloaded and installed — it doesn't need an Internet connection.

Programming

Whenever you use your computer or smartphone, you're using software that has been programmed by someone using a programming language. Programming languages are systems of communication between computers and humans. After you get good with one programming language, it's easier to learn more. And Scratch is a very good place to start.

You can explore other people's projects or you can create your own. If you find someone else's project and want to know how they've accomplished something, click the button that
	    says "See Inside" and take a look. The answer is there, but you might have to do some research before you understand it!

Sharing

All the code you find on the Scratch website is being shared. If you find a block of code in someone else's program that you need for your own project, you can use it. You don't need to ask permission; just give that person credit in the "Notes and Credits" section of your project documentation. Take a look at one of our Sparrow games to see how we've given credit to another Scratch user for a collision detection subroutine.

The same rules apply for any code that you share on the Scratch website. Someone can use it in their own project with or without asking you, but they have to give you credit — and they have to share their code with anyone else who might want it. This is called copyleft and software shared using copyleft is called free software.

Remixing

If you want to modify an existing program rather than starting a new one — like if you want to create a new maze for the Sparrow or if you want to give the Sparrow new abilities — here's what to do:

  1. Go to the project page that you want to copy.
  2. Click the "See inside" button.
  3. Click the "Remix" button.

This makes a copy of the project for you to develop. The original author is already credited by Scratch. Now you can give the Sparrow laser vision and a sound system!

Downloading

If you're using the Scratch Offline Editor, you can remix other people's projects by downloading them to your computer. You can even download your own projects to work on them offline. Here's how:

  1. Go to the project page that you want to copy.
  2. Click the "See inside" button.
  3. Click File ▼.
  4. Click Download to your computer.
  5. Save the sb2 file to your computer or thumb drive.

You can open the sb2 file with the Offline Editor to play it or modify it. If you have a Scratch account, you can upload edited sb2 files to the Scratch website.

All sb2 files of the Sparrow virtual robot games are available as a single zip file.

Class schedule and information

Coming soon: More robotics in 2016

We are planning to expand our robotics offerings in the year 2016! This will include new classes like intermediate and advanced robotics, new hardware, and a robotics club! Check here or with your local librarian for future updates.

Upcoming classes

Nothing scheduled. Contact a librarian to request a class!

* Classes last approximately one hour.

Previous classes

Date Time Location Contact
May   5, 2016  1:00PM WCPL Shreve 330-567-2219
Mar. 29, 2016  1:00PM WCPL Shreve 330-567-2219
Jan. 14, 2016  5:00PM WCPL Wooster 330-804-4663
Jan. 11, 2016  2:30PM WCPL Creston 330-435-4204
Dec. 29, 2015  2:00PM WCPL Wooster: Conference Room East 330-804-4663
Dec. 11, 2015  3:45PM Edgewood Middle School BGC Wooster
Dec. 10, 2015  3:45PM Edgewood Middle School BGC Wooster
Dec.  9, 2015  3:45PM Edgewood Middle School BGC Wooster
Nov.  3, 2015  4:30PM WCPL Wooster: Conference Room West 330-804-4663
Oct. 13, 2015  6:30PM WCPL Doylestown 330-658-4677
Aug. 10, 2015  3:30PM WCPL Wooster: Meeting Room 2 330-804-4666
Jul.  6, 2015  1:00PM WCPL Dalton 330-828-8486
Jun. 24, 2015  2:00PM WCPL Rittman 330-925-2761
Jun. 24, 2015 11:00AM WCPL Creston 330-925-2761
Jun. 20, 2015  1:00PM WCPL West Salem 419-853-4762

In the news