Time for action - complete the circuit

Once again, we will find a sprite that has some scripts attached to it and modify the control to work with the alligator clips on the PicoBoard:

  1. Start a new Scratch project and select choose new sprite from file.
  2. Delete the original sprite.
  3. Open the Fantasy folder and select the Jumping Jack sprite.
    Time for action - complete the circuit
  4. Replace the key up arrow pressed? block with the sensor block and select the A connected option.
  5. Replace the key right arrow pressed? block with the sensor block and select the B connected option.
  6. Replace the key left arrow pressed? block with the sensor block and select the C connected option.
  7. The PicoBoard has four connectors labeled A, B, C, and D. Plug a set of alligator clips into each of the A, B, and C sensors.
    Time for action - complete the circuit
  8. Start the game by clicking on the flag. Then, touch the two alligator clips attached to sensor A. The jack jumps for as long as the clips touch.
  9. Touch the clips on sensors B and C to move the sprite right and left across the stage.

What just happened?

When we touched the ends of the alligator clip, we completed a circuit and our sprite reacted by jumping or moving across the stage. Like the button, these sensors reported a true or false value. When the clips at the end of one of the wires were touched, the value was true.

Wiring our projects

When we touch the alligator clips together, we basically replicate a switch, like the one that turns the light on and off in our room. When we turn on a switch, we complete a circuit.

If we had a real switch, we could connect a clip to each connector and then use the switch to toggle the project on and off.

Tip

You can only create a circuit using the alligator clips attached to a single sensor. In other words, connecting the clips on sensor A to sensor B will not create a circuit, and the values for sensors A and B will remain false.

The alligator clips also measure the electrical resistance of the circuit on a scale of 0 to 100. We can use any material capable of carrying an electrical current to connect the alligator clips. Example materials might be foil, fingernail clippers, or other metals.

Measure electrical resistance

Before you start this exercise, collect a piece of foil, a wet napkin, and a wooden pencil. Feel free to substitute using your creativity.

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

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