Using Scratch with PocketLab

Submitted by PocketLab on Tue, 12/05/2017 - 18:18
Using Scratch with PocketLab

PocketLab let's you write Scratch programs that talk to the outside world. This guide will help you get started connecting your PocketLab to MIT Media Lab's Scratch software. With PocketLab and Scratch you can read real time sensor data in Scratch and write programs that interact with the outside world.

Follow these steps to get started with the PocketLab - Scratch integration: 

1. The PocketLab Scratch integration is a new feature. If you find an issue and need help, contact us at contact@thepocketlab.com. You're feedback will be extremely valuable to the PocketLab community. 

2. Follow this link to open our Scratch X program in a Chrome browser. Make sure pop-ups are enabled. The integration is only works on PocketLab compatible Max OSX and Chromebook devices. When the PocketLab Web App is up and running on Windows 10, it will also work on Windows 10 compatible devices. 

3. A different version of our PocketLab Web App will automatically open in a new tab. Connect your PocketLab to that version of the PocketLab Web App.  The PocketLab Scratch X program can now read data collected in the PocketLab Web App.

You can now write your own creative programs in Scratch that use PocketLab data as an input. 

There is a basic guide that shows a simple program to read temperature in a Scratch program which you can read here:

Programming with Sensors in Scratch

For some advanced level fun, we have a Scratch game Space Blaster lets you control a spaceship on screen with your PocketLab and shoot at asteroids. The lesson plan for this program is here:

A Wireless Controller for a Scratch Game

PocketLab makes science fun and easy

Comments

PocketLab

Thu, 12/07/2017 - 19:59

We had some fun at the PocketLab office making a Scratch program that uses PocketLab's IR Rangefinder and the Gyroscope to map out a 2D image of a "room." It works similar to LIDAR. It makes a great add-on to our RC BB-8 Star Wars toy. 

Here's a link to download the Scratch X file: https://www.dropbox.com/s/55ufubunn5y2k52/RangefinderMap.sbx?dl=0 

Here's a more detailed lesson on similar concepts of LIDAR: http://www.thepocketlab.com/support/lesson/voyager-ozobot-stem-team-determine-dimensions-cardboard-box