In this project, I show how to shoot an octopus along a parabolic (curved) path by using Scratch’s built-in timer and a simple calculation. As the cannon continues to hit the target, the game gets more difficult by building a taller wall between the cannon and the target.
For our exercise, we’re going to use a simple but powerful idea; if we instruct a sprite to turn a little and move a little, we create a curved line. To create a circle, the sprite needs to keep turning and moving until it makes a complete turn. Repeating the circle in a controlled way creates patterns.
Scratch has long been able to connect to the physical world by way of a PicoBoard, which is an external device that plugs into the USB port of a computer or a Raspberry Pi. The PicoBoard (available from SparkFun–www.sparkfun.com/products/10311)measures resistance, sound, button clicks, and includes a slider control. In this project, I’ll show you how to use a PicoBoard’s alligator clips to measure resistance and just to kick up the experiment a bit, we’ll use a thermistor to measure the resistance of water as it warms or cools.