Presentation is loading. Please wait.

Presentation is loading. Please wait.

Real-Time Data through Data Hubs. Begin by adding a basic Move block, 5 rotations 75% power.

Similar presentations


Presentation on theme: "Real-Time Data through Data Hubs. Begin by adding a basic Move block, 5 rotations 75% power."— Presentation transcript:

1 Real-Time Data through Data Hubs

2 Begin by adding a basic Move block, 5 rotations 75% power

3 Place a yellow Sound Sensor block from the Sensor Palette before the move block. The data plug for the sound block should be showing.

4 Wire the sound level plug to the power level plug on the Move block. The sound sensors value will be used as the robots speed. Make sure the sound sensor is plugged into Port 2. Download and Run the Program

5 The sound sensor blocks reads the sound sensor value, and passes it along to the motor block overriding the motor power value. Then the robot goes for 5 rotations using that value. If the sound value changes while the robot is running the Move block it is not passed on because the sound block is only run at the beginning of the program.

6 Restructure the program to use the data hubs to process live values The yellow sensor block must run more than once so it can continue to feed values to the Move block. The Move block must use the value then return immediately to the sensor block so it can update the sound level.

7 To repeat a behavior over and over again a loop is required. Drag a loop out of the Flow palette. Move both blocks together into the loop.

8 Adjust the Move block to run for Unlimited instead of 5 rotations so that the program does not need to wait for the full 5 rotations before checking the Sound sensor data value again. Set the 5 rotations to Unlimited in the loop: Sensor, Rotation Sensor, Port C, 5 rotations. Unlimited

9 Download & Run. Alternate talking and whispering to the robot as it moves. Does it change speeds?

10 A-Mazing Talking Using the sound sensor to control one of the motors speeds program the robot so that you can talk the robot through the maze. Robots begin in the center of the maze.


Download ppt "Real-Time Data through Data Hubs. Begin by adding a basic Move block, 5 rotations 75% power."

Similar presentations


Ads by Google