Code Blocks That Work with Sensor Boards

Scratch supplies additional sensing code blocks, as shown in Figure 6.15. In order to work with these code blocks, you need a Scratch Board. A Scratch Board is a special piece of hardware that you can buy from the Scratch website and then attach to your computer. You can use the Scratch Board to collect and process different environmental and user-provided input.

Figure 6.15. These sensing blocks are used in conjunction with a Scratch Board.


The first of these two blocks retrieves the value reported by one of the sensors on a Scratch Board. The second code block retrieves a Boolean value of true or false, depending on whether a specified sensor is being pressed. Learning how to work with a Scratch Board is outside of the scope of this chapter. Instead, you will learn how to programmatically interact with and control Scratch Boards in Chapter 14, “Collecting External Input Using a Scratch Board.”

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.124.40