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:7:30

Video transcript

ok so now we're going to give bitsy some eyes we're gonna use tricolour LEDs and bottle caps we're matching the LED up with a drill bit so that we can put a hole in the center of the bottle cap and the LED will basically serve as a pupil and the bottle cap will serve as an iris so we're going to trim the the excess off of the bottle cap there the scrap that the drill bit left and then we can put our LED in the middle of it and we've got a bit ci ok so the LED has four legs and the long one is the positive and that's important because we got a wire the LED in the right with the right polarity so we've got our two LEDs put on to our breadboard in the far far right and left sides and now we're connecting three transistors these transistors are the same transistors the NPN type transistors that we used for our sound module and for our camera to turn them on and off and trigger their functions so these LEDs are going to trigger the red blue and green lights in the LEDs that are on both the right and left sides so we're using 1k ohm resistors and that'll that'll be for our our base on the the transistor that's the center wire and right now we're just moving the the wires over for our IR sensor so that we have a little more space and then we're going to put another 1k ohm resistor there again going to the center pin on our transistors and so now that we've got that done we're going to take a look at our pin outs and you can see that a 1 is the green LED a o is the red LED and a 2 is the blue LED so we want to make sure that we wire those up accordingly so we can get the right colors to turn on when we want them to so we're using a green wire to indicate the green LED and that will go to the green 2 transistor that switches on and off the greens and then we're using a red wire for the one that's going to switch on and off the Reds and a black wire for the one that's going to switch on and off the Blues I didn't happen to have a blue wire and you can see how those are connected to the 1k ohm transistors or I should say resistors okay and so now we have a 220 ohm and we're going to connect that to the positive leg or the long leg of our LED both of our LEDs I should say and this is going to protect the LEDs from drawing too much current and burning out you can change the value of the resistor we'll talk in another video about how to determine the right resistor value but there is some variation and you know if you use a brighter a resistor with a higher value you're gonna get a dimmer LED and if you use a lower value get a brighter one okay so we've got those two in place and just fitting them with our needlenose pliers sometimes it's hard to get the leads to sit in in place all the way so now we're going to run our positive wire up from our power distribution board below that's the little board that we made in a previous video and we'll connect it to the same row as our 220 ohm resistor and let's gonna run one for each LEDs so there's one on the right side and one on the left and we'll connect the one on the right side again to that 220 ohm resistor and then sort of push it out of the way okay so the positive power has been fed and now we need to connect the now what we're going to do is we're going to connect the ground wire from the Power Distribution board below to our LED that's on our far right-hand side our far left hand side I should say and that's just going to the left leg on the with the transistor on the left-hand side and that's the transistor that's going to switch on and off our green and so we have another ground wire here and we can run that ground wire up from our Arduino because there's a ground port there and connect it to our resistor on this our transistor on this side I should say and now we're going to distribute the ground wire from the far left hand side transistor to the one in the middle and this uses the same type of wiring that we used before when we did our modular sound module and camera as I said before so now we're gonna connect the resistor that's switching the red wire or switching the red LED to the red LED pin which is the one on the far left when we're looking at the LED here and I think I already wired the green one you can see it down there in the bottom on it connects to the wire on the far right on that same LED and now we're going to run the wire for our blue LED and that's just the one right next to the green so we're stripping the wire there and now we're connecting it and connecting it to the transistor that should switch that on and off and um I'd already written some code for this I actually I believe we downloaded some code for this just some sample code and you can see it's just to make the LED light up and flash and you can get this code from Arduino --zz website it's just an LED flash and so you need to make sure that it's set up to the right pin house that we've that we've listed there but in any case so that one works so now we're going to connect that led to the one on the other side so we're gonna take our green wire and run it over to the same lead on the LED on the other side and so you'll see it only lights up green now it doesn't write out light up let red and blue because we haven't run the red and blue wires so as it flashes it goes through red blue green red blue green and you can see that only the green is showing up so now we're gonna run our other two wires we're gonna run our red wire and our blue wire and so the eyes should flash in synchronous together um so now we're gonna run our red wire and you should be able to see the red wire cause the led to flash red and green instead of just green on the right-hand side so there you go you can see it's red and green but we're still missing our blue I'll let you take a look at that for just a second so you can see the difference between each eye as they as they go about flashing so the one on the left is going red green and blue and then the one on the right is just red and green so now we're going to connect our final wire and that will allow us to light up in red green and blue one thing I want to note is that the GRU the blue LED is not as bright as the red or the green and you can change that by putting resistors on each LED instead of on on the one positive out you can put resistors on each LED that are different values and make the blue brighter and the green in the red less bright so that they're all sort of equal if you want so one thing you can see there is that the is that when I bumped it the the lights turned off and so it's it's temporary connection on the breadboard and it's possible things will come loose so you kind of have to keep an eye on that but it does allow you the flexibility of changing the configuration and trying different things