Watch all sensor values

As we've seen throughout our projects, it can be helpful to watch the values associated with the PicoBoard sensors. In addition to selectively watching the sensor values, we can watch them all at one time.

From the Sensing palette, right-click on the sensor block and select the show ScratchBoard watcher option.

Watch all sensor values

ScratchBoard was the predecessor to the PicoBoard. Selecting the ScratchBoard watcher places a monitor on the stage that shows all the sensors. Refer to the following screenshot:

Watch all sensor values

As you look at the screenshot, you might think that some of the values are missing. The alligator clip sensors measure resistance, as the picture shows. However, the alligator clip sensors also report a true or false value to indicate when the clips touch. Why doesn't the ScratchBoard watcher show the Boolean value of the alligator clip sensors?

Have I led you enough yet? As you might guess, the Boolean values of the alligator clips are reported. We just have to interpret the true and false. In the screenshot, sensors A, B, and C report 100 while sensor D reports zero.

We know from our experiments that a value of 100 means no current is flowing. The alligator clips might as well be disconnected, and the answer to the question, "Is sensor A connected?" would be false. By contrast, a sensor value of zero indicates the current is flowing freely and that the clips are connected.

Have a go hero

So, we know that an alligator clip sensor value of 100 means the clips aren't connected, and a value of zero means the clips are connected. What if the resistance is somewhere in between? Are the alligator clips connected? Attach the alligator clips for sensor A to the wet napkin to find out.

Pop quiz

  1. PicoBoards cannot be used with projects that are shared on the Web.
    • True
    • False
  2. Which of the following PicoBoard sensors are measured with numeric values?
    • Sound
    • Light
    • Alligator clips
    • All of the above
  3. If you want to view all the sensor values on the screen at one time, you:
    • Right-click on the sensor block and choose enable remote sensor connections.
    • Right-click on the sensor block and choose show ScratchBoard watcher.
    • You can't view all sensor values at one time
..................Content has been hidden....................

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