8*8*8 Led Cube With Audrino

Hey guys, I'm Davis And I'm Aaron And in this article, we're going to be making a one-way smart mirror It's basically a mirror with a monitor right behind it, and the mirror is reflective enough so that you can see yourself but you can also see the information on the TV screen. So in this video we're going to spend the first part constructing the frame that holds the TV then the second part we're going to load some application code that we created onto the mirror,




 All the links for the parts and the code will be in the description uh, so let's get started So to see how this is all going to come together, we built a 3D model of it on the computer and first we started out with this mirror that we bought here, and we're just gonna build a frame around it using four pieces of wood And we're gonna put that mirror right on the back of that frame And then for the sides of the frame, we're gonna use an additional four pieces of wood, just of a slightly smaller size to make sort of a box, and then inside the box, we're gonna put the monitor Now to keep the monitor in there, we're gonna use four corner brackets that we're gonna 3D print, and you can see they're gonna screw right into the frame there and then these triangular pieces are gonna keep the mirror up against the monitor and if you don't have a 3D printer that's okay because we're gonna be selling these for a pretty cheap price uh, so you can, um, easily make this yourself or you could use some other pieces of wood to locate that monitor in there.



And then lastly, there's gonna be the Raspberry Pi that's gonna controlling this and that's gonna be somewhere inside here and it's gonna be connected to the monitor though HDMI Alright, so we have all our materials here for building the frame, we have a couple pieces of one by threes, and we have a couple pieces of one by twos These bigger ones here we're gonna use to build the front of the mirror and, these are going to be corner cuts, and glued together, uh, using some wood glue And for the sides, uh, we're gonna use these here these one by twos, they're gonna go on the front just like this and we're gonna make a box basically with this so, first of all, we'll build a box, and nail these pieces together these side pieces, and then we're gonna put that on top of the front pieces that we did and glue them on there and after it's all done we'll put some uh, cherrywood finish on there, and it should make it look real nice so the length our our monitor is about 13 inches by 22 inches Now obviously the size of the frame is going to be different depending on the monitor you have but for what we're doing, we're gonna make the length and width of our frame two and a half inches longer than the dimensions of the monitor So, because for our side pieces.

 we're gonna be butting up against each other at 90 degrees each piece has to account for the thickness of the adjacent piece and also the thickness of the corner brackets, so each piece then is going to turn out to be 1.75 inches longer than the width of the monitor or, sorry, the length of the monitor So we're gonna measure two pieces at about fifteen inches and we're gonna have two additional pieces at around 23 and three-quarter inches Our mirror is going to be in portrait orientation, so our long pieces are gonna be our side pieces and our short pieces are going to be our top and bottom pieces Then we are going to butt these up right against each other just like so And that forms our frame So originally we thought we were going to nail these pieces together but we just tried this glue on a couple of scrap pieces of wood and it turns out that this is really strong so to make it easier for ourselves.


 I think we are just going to glue these together Okay, so the frame is done drying Uh, looks like it's pretty rigid just from the glue Uh, the nails weren't necessary And so now what I'm gonna do is take the bigger pieces here. This is gonna be the front of the frame and that's gonna go right on top For the front of the frame, we want the angles to look nice and neat We don't want it to look like these angles here so to make it look better we wanna start these pieces with a 45 degree angle right at the end of the frame like so and so each piece will come together at a 45 degree angle And, this piece is gonna be about twenty-five or twenty-four and a half inches long and then this piece here is gonna be about fifteen inches and three-quarters Alright, I got two of these pieces cut out at a 45 degree angle And we're just gonna glue these here right on top and to each other and then after that we'll just finish off with these other two pieces Alright, so just finished the frame here we put a stain on it so now its got a nice rustic look and what we're gonna do now is we got this, uh, Plexiglas sheet we found on Amazon the link will be in the description It's got a reflective coating on either side, but also allows light to pass through it So what we're gonna do now is put this on the inside of the frame here and sandwich it in between the frame and the monitor.



 So one we learned when we were doing this is that this stuff is pretty brittle here so if you're using some thick shears like this with wide blades that's going to crack the sides a lot so we had to switch to some thinner scissors and you also have to make sure it's pretty sharp too otherwise, uh, that will also make it more likely to break One thing we learned that helped is that if you're gonna cut it if you put some tape on there and cut along the edge of the tape like this then this side may crack a little bit but when you lift the tape up, it's smooth underneath and you get a straight edge so, that seems like the way to do it.



So looks like we managed to cut it without any major cracks through the glass but there are some minor cracks in here and we put some tape on there to make sure that those cracks don't propagate and so that we don't have a bunch of sharp edges on our mirror Alright, last thing we got to put the monitor onto the frame and the way we're gonna do that is with these 3D printed brackets These are just gonna go on all four corners of the monitor and it's gonna screw right into the wood and it's gonna sandwich that monitor onto the mirror, and up against the frame So the final product looks a little bit like this We got, uh, brackets on all four corners and I should also mention that it's ideal to get a low profile monitor This monitor is just over half an inch thick so it sits in the frame really nicely And if we flip it around to the other side It just looks like a plain ol' mirror I'm connected to my Raspberry Pi again through VNC We have a repository online for Smart-Mirror First thing I'm going to want to do is download this repository so I can open up my terminal and type get clone this repository



 So the next thing I want to do is install the dependencies for this project So you wanna make sure that you have pip installed If you don't have it installed, you can just, uh, google how to install pip





 So I need to run pip install -r requirements.txt and it will install all of my requirements and you might have to run sudo pip install -r requirements Okay, now all of my dependencies are installed I need to change a few things in my smartmirror.py file so I'm going to open that with vim So if I type vim smartmirror.py It will open up file and so we have, uh, three variables set here One is IP, one is country code, and the third is weather API token You need to set your IP of your Raspberry Pi to this variable, and it's used for location So we have a service that gets the location of your IP and from the location we determine what the weather is the forecast for the next few days So if you go to ipchicken.com, it will give you your current IP address and then the  country code is used for news Uh, so it's a ISO country code. Since we are in the US we put US here but you can use your own country's country code And then the weather API token is, um from a site called forecast.io So you'll need to make an account on forecast.io. It's free. and it will give you an API token and then you would just replace it in here This is the forecast.io site and if I scroll all the way down to the bottom there will be a uh, forecast API under developers and if you register Create an account, it will, uh, display a API token which is just a string value And so once you get that, you can come back to your smartmirror.py and then replace this token here with your API token Once I've done that, I can just hit, uh, escape and then capital ZZ to save Okay, now I can go back to my console and I'll need to do one more thing before I start this Uh, I need to install one more thing and is python imaging tk So you can install that with sudo apt-get install python-imaging.tk and after.



I run this, I can run python smartmirror.py And depending on how slow your network connection is it might take a few seconds to start up Okay, so now it's loaded and if I click on the window and press enter, it goes fullscreen and then if I press escape, it returns to just the windowed view So let's hook our Raspberry Pi up to the mirror and set it up so that it runs this application So now I have my Raspberry Pi hooked up to my smart mirror and the display is still in landscape orientation, and I need to switch it to portrait so in the slash boot folder there should be a file called config.txt If you use sudo vim to open up this config.txt file You should be able to scroll down to the bottom and we need to add a variable, so I added this variable called display_rotate and I set it equal to one, and this will rotate the monitor so that it is in portrait orientation so if I press escape and then colon w q exclamation mark it will save this file and now I need to restart my Raspberry Pi Okay, so now we are in portrait orientation I'm just going to... run the application Now I'll hit enter to make it fullscreen and now we have our very own smart mirror set up Alright, so that's it for this video, we really hope you liked it Eventually, we actually want to incorporate some AI components into this mirror where you can talk to the mirror, and the mirror will talk back to you But, unfortunately, that was just a little too much for this video So if you want to stay up to date with all our other videos, make sure your subscribe if you haven't already But until then, see you next time