Home Project Ideas Project Guide Ask An Expert Blog Careers Teachers Parents Students

Pinwheel Magic: Take a Spin with Animation

Difficulty
Time Required Long (2-4 weeks)
Prerequisites You must have access to a computer with an Internet connection.
Material Availability You must purchase a PicoBoard. See the Materials and Equipment list for more details.
Cost Average ($50 - $100)
Safety When working in front of the computer, be sure to take plenty of breaks in order to stretch and give your eyes a rest.

Abstract

Do you enjoy watching cartoons and animated films like How to Train Your Dragon and Toy Story 3? Do you have fun playing video games? What do all of these things have in common? Fantastic computer animation, that's what! It's a cool job to take an interesting story or game and make it more entertaining by animating it. In this computer science project, you won't animate a full-length feature movie, but you will animate a pinwheel—a project that can go a long way toward creating your own longer animations! You will create an animated pinwheel that can spin as a result of a push of a button or puff of breath. How? Not by magic, but by writing a simple computer program. Don't worry, even if you've never programmed before, this pinwheel animation magic is within your reach. Sound interesting? Then read this science project and get started!

Objective

In this computer science project, you will create a pinwheel animation in Scratch that will spin as a response to user input from the PicoBoard.

Credits

Michelle Maranowski, PhD, Science Buddies

Share your story with Science Buddies!

I did this project I Did This Project! Please log in and let us know how things went.


Last edit date: 2014-03-03

Introduction

Note: This Science Buddies project idea was written using Scratch version 1.4. A new version, Scratch 2, is now available. You can use an online version of Scratch 2 in your web browser at scratch.mit.edu, or you can download an offline version.

While Scratch 2 offers improvements over Scratch 1.4, the layout and some features have changed slightly. This means that the procedure below will not exactly match the new features of Scratch 2. If you need help using Scratch 2, you should go to the official Scratch help page. If you would like to follow our directions exactly, you can still download Scratch 1.4 here.

It's fun to enjoy a nice day at the park. There might be just enough breeze to fly a kite and enough space to run with a pinwheel and watch it spin with each step. You already know that a pinwheel needs wind in order to spin, even if it is just someone blowing on it. But what if you could make a pinwheel spin without wind, and instead, by pushing a button, a slider, or blowing into a microphone? That would be different and interesting! But how can you do this? Well, you can write a computer program that will make a pinwheel appear on your computer screen and spin when you push a button, puff a breath of air, or provide some other kind of user input. You might be asking, what is a computer program and what is user input? How do you put together a computer program? Let's start with some quick definitions.


Computer Science science project Figure 1.
Figure 1. This girl is having fun blowing on and spinning a real pinwheel—something you can do, too, on the computer screen! (istock.com, 2010.)

A computer program is a set of algorithms (instructions) that tell a computer exactly what to do. What can you use to put together such a set of instructions? One way you can put together a computer program is in Scratch, an easy-to-learn programming environment for your computer. Scratch is easy to use, so even if you've never written a program before, you'll be able to use Scratch! Plus, Science Buddies has put together a lot of help resources, including the Procedure of this project, to help you get started. You can write all kinds of programs in Scratch, including animations, stories, and games. Scratch offers the user (in this case, you!) many different types of instructions, called blocks, which you can snap together. All you have to do is to drag and drop the blocks that you need into the editing window and you can create something amazing!

Scratch offers all kinds of instruction blocks—blocks to change the appearance of objects on the screen, blocks that can make objects on the screen move, and even blocks that ask for user input. Wait, what is user input? User input is information that the user (the person using the computer) shares with the computer program, like pushing a button or talking into a microphone. The computer program then uses the user input to run the tasks in the program. Even now, as you, the user, read this on the computer monitor, you're giving the computer input. You're probably clicking the mouse or using an arrow key to tell the computer that you want to scroll down the page. The computer program, in this case your Internet browser, responds to that input by moving to the next part of the webpage. In Scratch, there is an instruction block that asks the user a question. Once the program receives an answer (user input), it then uses the answer to the question to make the rest of the computer program run the way you want it to.

You can also use a simple device called a PicoBoard to share information with the computer program. A PicoBoard is a collection of sensors. A sensor is a device that detects the presence or absence of something. An example of sensors with which you might be familiar is the Wii remote controller. Depending on the buttons you push or motions you make with the Wii remote (these are the sensors), different things will happen on the screen. The PicoBoard is similar—it is a small board with a button sensor, a slider sensor, a light sensor, a microphone, and other sensors. You can program in Scratch to receive information from the PicoBoard, then use any of these sensors to share information and interact with the computer program.

In this computer science project, you will build an interactive pinwheel animation using Scratch and a PicoBoard. The beauty of computer programming is that it allows you to create just about anything you can imagine, and this science project is a great way to get started. You can create a very cool computer science project, while having lots of fun!

Terms and Concepts

  • Computer program
  • Algorithm
  • Scratch
  • User input
  • PicoBoard
  • Sensor
  • Computer science
  • Flow chart

Questions

  • What is computer science? Is computer science all about programming?
  • Can you describe examples in your home or at school where you see computer science demonstrated?
  • What are some areas of study within the computer science field?
  • Can you write out an algorithm for an everyday activity, like doing the laundry or making a sandwich?

Bibliography

These resources will introduce you to Scratch:

Materials and Equipment

Disclaimer: Science Buddies occasionally provides information (such as part numbers, supplier names, and supplier weblinks) to assist our users in locating specialty items for individual projects. The information is provided solely as a convenience to our users. We do our best to make sure that part numbers and descriptions are accurate when first listed. However, since part numbers do change as items are obsoleted or improved, please send us an email if you run across any parts that are no longer available. We also do our best to make sure that any listed supplier provides prompt, courteous service. Science Buddies does participate in affiliate programs with Amazon.comsciencebuddies, Carolina Biological, and AquaPhoenix Education. Proceeds from the affiliate programs help support Science Buddies, a 501( c ) 3 public charity. If you have any comments (positive or negative) related to purchases you've made for science fair projects from recommendations on our site, please let us know. Write to us at scibuddy@sciencebuddies.org.

Share your story with Science Buddies!

I did this project I Did This Project! Please log in and let us know how things went.

Experimental Procedure

Note: This Science Buddies project idea was written using Scratch version 1.4. A new version, Scratch 2, is now available. You can use an online version of Scratch 2 in your web browser at scratch.mit.edu, or you can download an offline version.

While Scratch 2 offers improvements over Scratch 1.4, the layout and some features have changed slightly. This means that the procedure below will not exactly match the new features of Scratch 2. If you need help using Scratch 2, you should go to the official Scratch help page. If you would like to follow our directions exactly, you can still download Scratch 1.4 here.

Note: This engineering project is best described by the engineering design process, as opposed to the scientific method. You might want to ask your teacher whether it's acceptable to follow the engineering design process for your project before you begin. You can learn more about the engineering design process in the Science Buddies Engineering Design Process Guide.

Programming Your Pinwheel Animation

  1. In this computer science project, you will create a pinwheel animation in Scratch that will spin as a response to user input from the PicoBoard. It can use any of the sensors from the PicoBoard—the light sensor, the microphone, or the slider.
  2. The first thing you should do is download the Scratch program from scratch.mit.edu.
  3. If this is your first time using Scratch, read the Science Buddies Installing & Getting Started with Scratch page. This short guide will familiarize you with Scratch.
  4. Now that you have downloaded Scratch, you need to get your computer set up to work with the PicoBoard. Read this Connecting & Using a PicoBoard with Scratch page to learn how to get your PicoBoard working and to learn more about the sensors on the PicoBoard.
  5. Once you have read all of the help documents and feel comfortable in the Scratch programming environment and with the PicoBoard, it is time to start the project. As noted at the beginning of the procedure, this science project follows the engineering design process.
  6. Define a need. In this case, you'll create a fun, interactive pinwheel. But you should first think about things like who is going to play with it and what colors might they like. First, define who your audience is and what features in a pinwheel they would like to see.
  7. Develop the project requirements. Before you start programming, you'll need to make a decision about what the pinwheel will look like and what the user will do to make it spin. Write down all your decisions.
  8. Establish design criteria. Once you have settled upon the project requirements, you need to get down to the business of developing the specific details. These details are called the design criteria. Having a good set of design criteria will help you focus your efforts. The following is a set of questions to help you think about your design criteria. Note that it is not a complete list. You can either use this list of questions to develop your design requirements, or you can develop your own.
    1. How long will the pinwheel spin when the input is given?
    2. How many sprites will you use in the animation? From where will you get the sprites and how will they look? For example, will the pinwheel have three wings or four wings? Will you take a digital picture and then upload the image into Scratch or draw your own pinwheel using the paint feature in Scratch?
    3. Will you provide an instructions background sometime during the animation so that the viewer will know how to make the pinwheel spin?
    4. How many backgrounds do you plan to use in the course of the animation? Will you take a digital picture and then upload the image into Scratch?
    5. Would you like to use music in your animation? Will the animation be associated with a background or a sprite?
    6. How many different categories of blocks do you want to attempt to use?
    7. Try to use at least two blocks from the Control category.
    8. Which sensor will you use from the PicoBoard? Note: For a review of the different sensors, refer back to the Science Buddies help page Connecting & Using a PicoBoard with Scratch.
    9. What kind of motion do you want the pinwheel sprite to make once it receives input? How long should the pinwheel sprite move once it has received input from the user/PicoBoard? In which direction will it move?
  9. Create and analyze designs. Keeping your design criteria in mind, make a rough sketch, flow chart, or plan of what your pinwheel animation will look like and what the sprites do and/or say. A flow chart is a diagram of boxes where each box represents a step in the program you wrote.
  10. Build and test a sample program. Once you have created a set of design criteria, it is time to open up Scratch and start working on a sample program. Build your pinwheel sprite and have it do something interesting. Remember to review your design criteria as you work so that you keep yourself focused on the task.
  11. Program your pinwheel animation. Keep testing the animation as you work. When you feel that you have accomplished a certain design criteria or task, run the animation and test it out.
    1. Break the task up into smaller tasks. For example, the first task to accomplish is to get a pinwheel to appear on the screen. The second task is to decide which blocks to use to start the pinwheel spinning.
    2. It is a good idea to test along the way so that you can iron out small issues as they crop up. You don't want to have a long program at the end that doesn't work and you don't know why.
    3. If you don't like what you see, then rearrange the instruction blocks into a configuration that you believe will work better.
    4. Once you have finished your animation, check to see that all of the requirements that you set at the beginning of the project have been met.
  12. Test and redesign. Test your animation on your friends and family and sit back and watch the fun! How did they like it? Can you use their feedback to improve your animation? Read the Science Buddies Troubleshooting a Program in Scratch if you need help with your program.

The Final Product: Presenting Your Animation

  1. Once you have finished the final version of your animation and you are happy with it, it is time to show it to your friends and family again.
  2. When presenting your animation work at your science fair, try to bring in a computer. If you are not able to do so, take many screenshots of your work, print them out, and mount them on a poster board.
  3. Your science fair presentation should also include:
    1. The requirements list and the design criteria that guided your animation.
    2. A flow chart of how your animation program works.
    3. An explanation of what you learned from your research and from doing the animation.

Share your story with Science Buddies!

I did this project I Did This Project! Please log in and let us know how things went.


Variations

  • Try to use as many sensors from the PicoBoard as possible in your animation.
  • Try creating a story around the pinwheel, using different backgrounds, other sprites, and text. Can the audience use the pinwheel input to affect the outcome of the story?
  • Tired of pinwheels? Apply the same principles to making an interactive animation of another object that interests you. Hint: When creating your design criteria, think carefully about what the object does and how people normally interact with it.

Share your story with Science Buddies!

I did this project I Did This Project! Please log in and let us know how things went.

Ask an Expert

The Ask an Expert Forum is intended to be a place where students can go to find answers to science questions that they have been unable to find using other resources. If you have specific questions about your science fair project or science fair, our team of volunteer scientists can help. Our Experts won't do the work for you, but they will make suggestions, offer guidance, and help you troubleshoot.

Ask an Expert

Related Links

If you like this project, you might enjoy exploring these related careers:

artist drawing at computer

Multimedia Artist or Animator

If you've ever watched a cartoon, played a video game, or seen an animated movie, you've seen the work of multimedia artists and animators. People in these careers use computers to create the series of pictures that form the animated images or special effects seen in movies, television programs, and computer games. Read more
Computer programmer typing on a keyboard

Computer Programmer

Computers are essential tools in the modern world, handling everything from traffic control, car welding, movie animation, shipping, aircraft design, and social networking to book publishing, business management, music mixing, health care, agriculture, and online shopping. Computer programmers are the people who write the instructions that tell computers what to do. Read more
NASA flight software engineer

Computer Software Engineer

Are you interested in developing cool video game software for computers? Would you like to learn how to make software run faster and more reliably on different kinds of computers and operating systems? Do you like to apply your computer science skills to solve problems? If so, then you might be interested in the career of a computer software engineer. Read more