If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content
Current time:0:00Total duration:2:34

Video transcript

it's very powerful to understand how our inputs and outputs can communicate with each other or more specifically how they can be wired together now these two things speak the language of numbers our inputs are anything that is providing data to the brain so any of our sensors for example let's pretend we plugged in a light sensor now the light sensor provides a value and this will depend on the sensor you're using in the case of a light sensor it's providing a value between 0 and 100 which represents the intensity of the current light condition in front of the sensor now our outputs are the opposite our motor or our lamp or speaker output so we actually provide a number to so they know how to behave and in the case if this was a motor we would provide it direction and power but for the the speaker we could provide it multiple up outputs such as pitch which is the frequency of a tone and we could also send it volume and these are the two most important features now the powerful thing to realize is that we could take this intensity value and plug it in to say pitch so as the environment changes if we flip the lights on or grab a flashlight you will actually hear this change in real time using the speaker so let's grab an input for example our light sensor and an output for example the sound block and two wire blocks together you have first have to click on the bottom of the block which will expand this little column here which will give you access to them and here are all my inputs and outputs inputs on the Left outputs on the right-hand side so remember we want to take our light intensity and if I scroll down there is an intensity output here and I can click on it and then drag this wire and I will plug it into the pitch or tone frequency input on this sound block now there's also volume and other things here I plugged it into pitch so now these two blocks are wired together so to get a dynamic behavior you need to drop this inside a loop and then it will continue to update and you should be able to hear the difference