Book Image

Scratch 2.0 Beginner's Guide: Second Edition

By : Michael Badger
Book Image

Scratch 2.0 Beginner's Guide: Second Edition

By: Michael Badger

Overview of this book

Table of Contents (18 chapters)
Scratch 2.0 Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – enabling and testing the PicoBoard support in Scratch 1.4


The blocks we need to interact with the PicoBoard are hidden by default. Let's enable them by proceeding with the following steps:

  1. Plug your PicoBoard in to your computer and start Scratch. In the Sensing palette, there are two blocks related to the PicoBoard: the () sensor value reporter block and the sensor () Boolean block as shown in the following screenshot:

  2. Let's ensure we have a signal. Click on the checkbox for the (slider) sensor value block to show the stage monitor.

  3. Then move the slider back and forth and ensure that a value is being reported as you move the slider. The following screenshot shows the stage monitor:

  4. If the block is not detecting a value, double-check your connections, and ensure you have the drivers from the manufacturer installed correctly. You should also close Scratch and reopen it.

What just happened?

The PicoBoard is connected, and Scratch is reading values from the board. The () sensor value and sensor () blocks will be used as values and conditional evaluations for many other blocks in Scratch.

Adding the PicoBoard support to Scratch 2.0

I know what you're thinking. At the beginning of this appendix, I said Scratch 2.0 doesn't support the PicoBoard—at publication, that's true. You can check if PicoBoard is supported in 2.0 by shift-clicking on the More Blocks palette. That will display an Add an Extension button, which will give you access to Extension Library.

If PicoBoard is available, it will be an option in Extension Library. You can select it, and then test the PicoBoard just as we did in the previous exercise. At various times, the PicoBoard option has appeared and reappeared in Extension Library, but it's only a guess as to when the support might officially show up in Scratch 2.0.

The following screenshot shows the proposed PicoBoard blocks in 2.0 (from a time when the extension was available):

Note

You can keep yourself updated on Scratch 2.0 and the PicoBoard support via the following resources: