Our original slideshow contains a when right arrow key pressed control block to advance the screen. We will leave that control in place so that our slideshow still works when we share it on the Web.
Open your slideshow and save it as a new project so that you can feel free to experiment without altering the original project. If you don't have the slideshow, you can download mine from this book's web site at Packt Publishing.
Our button clicks are a bit more controlled with the broadcast block, but the slideshow still has a tendency to advance more than one slide at a time. As you think about how we can fix the timing problem, let's examine our script.
Even though our script behaved a bit wonkily, we got the general idea. The PicoBoard allowed us, the slideshow narrators, to be detached from the computer screen and the keyboard. Yet, we still controlled the pace of the show.
The key to this script was the forever if sensor button pressed block. The sensor reported a true or false value to measure the button click. If the button was pressed (true), then we broadcast the message to switch to the next background.
To display the value of the button pressed sensor on the stage, click on the sensor block from the Sensing palette. Each time you click on the button, the sensor reports a true value.
Compare this to the other PicoBoard sensors that report a range of numbers. Either the button is pressed or not; we can't measure how hard we press the button.
In addition to the button sensor, the alligator clips that connect to the A, B, C, and D sensors also report a true or false value. Later in the chapter, we'll create a project to test whether or not the alligator clips are connected.
3.133.133.233