Pinwheel Magic: Take a Spin with Animation
|Areas of Science||
|Time Required||Long (2-4 weeks)|
|Material Availability||Computer with internet access and some additional hardware. 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.|
AbstractDo you enjoy watching cartoons and animated movies? 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!
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.
Michelle Maranowski, PhD, Science Buddies
Cite This PageGeneral citation information is provided here. Be sure to check the formatting, including capitalization, for the method you are using and update your citation, as needed.
Last edit date: 2020-06-23
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.
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
- User input
- Computer science
- Flow chart
- 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?
These resources will introduce you to Scratch:
- Science Buddies Staff (n.d.). Scratch User Guide: Introduction. Science Buddies. Retrieved September 14, 2017.
- Scratch Team (n.d.). Getting Started with Scratch version 1.4. MIT. Retrieved September 14, 2017.
- Scratch Team (n.d.). Reference Guide Scratch version 1.4. MIT. Retrieved September 14, 2017.
These resources provide more information about the Picoboard and using it with Scratch:
- Science Buddies Staff (n.d.). Scratch User Guide: Connecting & Using a Picoboard with Scratch. Science Buddies. Retrieved September 14, 2017.
- SparkFun Electronics (n.d.). Picoboard. Retrieved September 14, 2017.
- Huang, B. (n.d.). Using the SparkFun Picoboard and Scratch. SparkFun Electronics. Retrieved September 14, 2017.
News Feed on This Topic
Materials and Equipment
- Computer with an Internet connection
- PicoBoard (1), including alligator clip cables (4); available from SparkFun Electronics at www.sparkfun.com/products/10311
- Mini-USB cable (1); available from SparkFun Electronics at www.sparkfun.com/products/11301
- Optional: Digital camera
Disclaimer: Science Buddies participates in affiliate programs with Home Science Tools, Amazon.com, Carolina Biological, and Jameco Electronics. Proceeds from the affiliate programs help support Science Buddies, a 501(c)(3) public charity, and keep our resources free for everyone. Our top priority is student learning. If you have any comments (positive or negative) related to purchases you've made for science projects from recommendations on our site, please let us know. Write to us at firstname.lastname@example.org.
Scratch Project Note
This project idea was written using Scratch version 1.4, which is available at the Scratch 1.4 download page. A Science Buddies tutorial for Scratch 1.4 is available on our Scratch User Guide and additional tutorials are available on the download page. The project can be modified to work with other versions of Scratch. Information about the most recent version of Scratch is available at the MIT Scratch website.
Programming Your Pinwheel Animation
- 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.
- The first thing you should do is download the Scratch program from http://scratch.mit.edu/scratch_1.4/.
- 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.
- 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.
- 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.
- 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.
- 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.
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.
- How long will the pinwheel spin when the input is given?
- 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?
- Will you provide an instructions background sometime during the animation so that the viewer will know how to make the pinwheel spin?
- 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?
- Would you like to use music in your animation? Will the animation be associated with a background or a sprite?
- How many different categories of blocks do you want to attempt to use?
- Try to use at least two blocks from the Control category.
- 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.
- 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?
- 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.
- 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.
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.
- 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.
- 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.
- If you don't like what you see, then rearrange the instruction blocks into a configuration that you believe will work better.
- 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.
- 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
- 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.
- 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.
Your science fair presentation should also include:
- The requirements list and the design criteria that guided your animation.
- A flow chart of how your animation program works.
- An explanation of what you learned from your research and from doing the animation.
Keep the fun going! Find local opportunities related to this project.Register on ActivityHero
If you like this project, you might enjoy exploring these related careers:
- 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.
Ask an ExpertThe 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
News Feed on This Topic
Looking for more science fun?
Try one of our science activities for quick, anytime science explorations. The perfect thing to liven up a rainy day, school vacation, or moment of boredom.Find an Activity
Explore Our Science Videos
Why Do Apples and Bananas Turn Brown? - STEM activity
DIY Glitter Surprise Package with a Simple Circuit
5 Easy Fizzing & Foaming Science Projects