Skip to main content

Scratch

Uses the Scratch programming language

A Wireless Controller for a Scratch Game

Submitted by DaveBakker on Tue, 04/10/2018 - 02:36

Let's create a game in Scratch that is controlled by a wireless controller using the PocketLab accelerometer. PocketLab can connect directly and wirelessly to Scratch, and can send sensor data in real time. This game uses the PocketLab accelerometer to move sprites around the screen.

This program is for intermediate or advanced Scratch users, and if you would like a simpler starting point to get started with connecting Scratch to the outside world through PocketLab, you can start here:

Programming with Sensors in Scratch

Submitted by DaveBakker on Sun, 04/08/2018 - 05:18

This lesson will show you programming in Scratch with external sensors. We can read sensor data directly into Scratch and use it to write programs that make decisions based on what the sensors are measuring. If you need a quick primer on Scratch programming, go to this link. There are plenty of resources to get you started.

Scratch and PocketLab Space Blaster game

Submitted by DaveBakker on Tue, 03/06/2018 - 00:03

Download the Scratch .sbx file for a Space Blaster game you can play with Scratch and PocketLab. Works with PocketLab One and Voyager. 

Instructions to run ScratchX and the PocketLab web app are here.

The Space Blaster game is also featured in our PocketLab and Scratch STEM Coding Challenge - see attached pdf file for complete programming guide.

A Lesson in Radioactivity and Half-Life: Voyager/Scratch Geiger Counter Simulation

Submitted by Rich on Tue, 02/20/2018 - 21:10

This lesson makes it possible for your students to study radioactive decay and half-life concepts without the need to purchase expensive radiation monitors and actual radioactive isotopes.  Scratch and Voyager work together to accomplish this via a simulation that matches that of true radioactive decay.  ScratchX is not required, but may be used.  The Scratch program provides the decay process.  With each decay of a simulated atom, the Scratch screen quickly flashes white and emits a beep sound similar to that of a typical Geiger counter.  Voyager’s light sensor records each of the decays a

True Random Numbers in Scratch

Submitted by DaveBakker on Fri, 02/16/2018 - 01:06

We can create a way to make true random numbers in Scratch using the PocketLab Voyager's light sensor and a lava lamp. Sounds crazy? Not really, there is actually a US patent for such a system! It turns out that on their own, computers are not good at generating true random numbers, therefore to make true random numbers using a computer you need an external source of randomness.

A Lesson in Probability and Statistics: Voyager/Scratch Coin Tossing Simulation

Submitted by Rich on Wed, 02/14/2018 - 19:25

This lesson introduces students to a variety of probability and statistics concepts using PocketLab Voyager and Scratch—ScratchX is not required.  The Scratch program simulates tossing any number of coins any number of times, displaying the number of heads in each toss with a square having varying shades of grey—black for zero heads and white for the maximum possible number of heads in each toss.  The simulated coins are tossed once each second with Voyager’s light sensor recording the results for each toss.

Six Shades (not fifty!) of Grey: PocketLab Voyager/Scratch Dice

Submitted by Rich on Tue, 01/16/2018 - 22:20

This is a programming project that capitalizes on PocketLab-Scratch Integration.  This project makes use of the Scratch random number block to simulate rolling an ordinary six-sided die.  The six random but equally likely outcomes are mapped to sprites of six different shades of gray.  Voyager’s light sensor is then used to determine the value of the die’s roll, mapping light sensor values to the corresponding sprite from six images of the face up side of the die.  A short action video of the author’s solution accompanies this lesson. 

Programming Exercise:Voyager Temperature Probe Controlled Scratch Teapot

Submitted by Rich on Fri, 12/29/2017 - 01:16

Here is a project that will challenge your students’ skill in interfacing PocketLab Voyager with Scratch Programming.  The challenge is to program the five bubbles to start bubbling upwards in the teapot—one bubble at 90ᵒC, two at 92ᵒC, three at 94ᵒC, four at 96ᵒC, and five bubbles at 98ᵒC.  When the temperature of the teapot has reached 100ᵒC, the phrase Full Boil should appear.  See the movie accompanying this lesson for clarification of the intended result.  When the burner under the real teapot is turned off and cooling begins, bubbling should go away in revers

Interfacing PocketLab Voyager with Modular Robotics Cubelets Maker Space

Submitted by Rich on Mon, 12/18/2017 - 20:39

The maker revolution has grown by leaps and bounds during the past four years. With dozens of robotic toys for learning and discovery now in the marketplace, it makes sense to give students opportunities for interfacing these robots with the investigative powers of PocketLab Voyager. This lesson describes an example project by which students interface Voyager with Modular Robotics Cubelets—robot blocks that magnetically connect to form an endless variety of robots. There are seventeen different blocks in three categories—sense, think, and act.