Download and watch the episode here:
Know How... 82
On this episode of Know How, we’re all about the Raspberry Pie and a little bit of a hat for the time lapse camera and yeah, it’s crypto currency.
Net Casts you love, from people you trust. This is Twit!
Fr. Robert Ballecer: Welcome to Know How, this is the show where we build, break, bend and upgrade. I’m Father Robert Ballecer.
Brian Burnett: And I’m Brian Burnett.
Fr. Robert: For the next 30 minutes or so, we’re going to break down a few geek projects and give you the knowledge to do all this stuff. Now, Brian. You’re into doge, right?
Brian: I’d say so.
Fr. Robert: You’re doge-tastic?
Brian: Big doge.
Fr. Robert: You’re doge-tacular?
Fr. Robert: Doge-miters?
Brian: Now you’ve gone too far.
Fr. Robert: Alright we know that Doge is an out currency. It’s a crypto currency and we did a little bit of explanation about this on a previous episode of Know How but did you want to give the folks a quick primer, a quick reminder of what it means to mine crypto currency?
Brian: Well, Doge specifically? I feel like doge is a crypto currency for fun, more so than Bitcoin. Actually bit coin is to the point now where you need industrial strength hardware to even make one.
Fr. Robert: You need those specifically designed Asics, those pieces of silicone that do nothing but the number crunching for the hashing that is required for the crypto currency.
Brian: And that’s why Doge was great because you use mostly anything to make it. But now it’s gotten so much harder to do, even now, and it’s only been a few weeks.
Fr. Robert: And one of the weaknesses of all crypto currencies has been that fact that it starts off easy, right? The difficulty rating is pretty low, it’s easy for you to mine, and then slowly it ramps up as more blocks are uncovered, as more rewards are given out. Doge or lite coin or bit coin becomes increasingly more difficult to get. Now, we are not going to be talking about that. What I want to talk about is do you know what happens to all that hashing? All that much mining when you’re done?
Brian: All that work that these computers are doing? All that power that they’re absorbing and wasting?
Fr. Robert: Yes. And actually that is a very good term - it is wasted. The way that crypto currency is awarded is that they’ve got a block chain that can be unlocked when your computer, your GPU, your system unlocks certain crypto graphic hashes. Once those are unlocked, those hashes are good for nothing. They are just tossed away. It is just a way to unlock the reward. And there have been a lot of people, in fact some people in our chat room in our Gplus community have said, “Wait a minute Padre. Couldn’t you use that computing power for good? Why do you just have to throw away the crypto graphic hashes? Couldn’t you turn something like a Doge coin into a force for much good”?
Brian: Yeah, but what would you do for that?
Fr. Robert: Well, how about this? There are a few projects that we run throughout the history of distributive computing. Things like, have you ever heard SETI@home?
Brian: I have heard from SETI@home.
Fr. Robert: Have you searched for extra-terrestrial intelligence?
Brian: And Folding@home?
Fr. Robert: Yes, Folding@home. Both of those used a lot of computing power to figure out a complex real world problem. In the case of SETI, they were looking for a signature. A signature for a signal that would indicate that there is some sort of extra-terrestrial life. In the case of Folding, they were looking at folding proteins, which is actually a mathematical problem so if you get enough computing power you can figure out the folding of those proteins which allows you to do things like, I don’t know, solve the diseases.
Brian: Which is pretty cool. Now if you could bring those things together and not have that wasted energy.
Fr. Robert: Exactly. So that is what we are starting to see in some of these alt coins. We have some coins that have been developed recently. The one that I like is called the RIE-coin. Have you heard about that?
Brian: RIE-Coin? I have heard about
that. Now this coin is different because it solves for prime numbers?
Fr. Robert: Exactly. So it is named after Bernhard Riemann who was a mathematician who studied the distribution of prime numbers. And anyone who is a mathematician understands how important prime numbers are. The number that is only divisible by itself and by 1. The first couple of prime numbers are easy to figure out. 1, 3 5, 7…
Brian: Then as you start to get out there…
Fr. Robert: It gets further and further out. So this new RIE-coin actually uses the power of those distributive computers to figure out the next prime.
Fr. Robert: Yeah. So, I like this for a number of reasons. One, because it is geeky, right? Math is awesome, science is awesome, who knows prime numbers could lead us to 42?
Brian: Something! The answer to the Universe?
Fr. Robert: Life and everything! But here is the other thing. One of the issues that people have had with Alt counts, with crypto currency is they think, “Oh you’re just trying to make money out of nothing”. Well, what if the work that went into making that crypto currency was actually valuable?
Brian: Yeah. Instead of just heating my room at home! With my computer running all day.
Fr. Robert: The RIE-coin isn't the only crypto currency that had this idea right? You came up with one?
Brian: There is another one with even a simpler name, prime coin. Same thing, it is solving for prime numbers and coming up with the hash chain.
Fr. Robert: Now I’m hoping that this becomes a trend because when you think about how much power goes into much mining, big doge.
Brian: That’s what I like to imagining is happening inside my computer. There are little doges in there mining away.
Fr. Robert: I actually made, I will admit, I made a 10 hour loop of that. It runs on a monitor in my lab.
Brian: That does not surprise me.
Fr. Robert: It is bad. I’m sorry, I have a problem.
Brian: You were saying?
Fr. Robert: If we could get more of the crypto currency to do that. To use that hash power for good. Well then I think more people would get behind it.
Brian: Especially for doge coin because it’s not very valuable. You’re doing it for fun.
Fr. Robert: What is the rate right now?
Brian: It’s like .0012 I think Alex has it up on the monitor here. Yeah, .0012. But it’s up!
Fr. Robert: That’s a bubble! According to that and I’ve got a million doge; I’ve got a little bit of cash there!
Brian: So it is up, but the amount of doge coin that I have in my wallet does not come anywhere near to the amount of money I’ve spent on electricity and it’s not worth me doing it at work anymore. I definitely don’t do that, so..
Fr. Robert: Save it for your retirement. It’s not even close to the amount of electricity that Leo has spent on Twit.
Brian: I don’t know. I haven’t been stealing any BYB laptops in awhile.
Fr. Robert: All right. Let’s put away the doge and let’s get to our first project. Now one of the things we’ve heard from you about is that you want more Raspberry Pie. I mean who wouldn’t want it? Low cost computer. This is what $40 right?
Brian: Yeah. With a 512 MG.
Robert: With a 512 MG and there have been so many
innovative things that people have done with a Raspberry Pie. We’ve seen the pudding, the clusters, we used it to make a camera server, a surveillance
server. I know other people who use them
as sort of the home automation node, a little computer that can tell the
temperature, humidity, or sound of someone breaking into your house. But we had a request, specifically, to turn
one of these things into a web server. You want to know how we did this?
Brian: Sure, you going to show me?
Fr. Robert: Sure. But first we’ve got to show you what you’re going to need. It’s really simple set of hardware. If Alex could bring up our product shot here. You need two USB devices, a USB keyboard and USB mouse.
Brian: Just to interface with the Pie.
Fr. Robert: Just to interface with the Raspberry Pie. You’re going to need a SD card. I prefer the 16 GB ones. 16 GB and above, just because I like a little bit of space.
Brian: Are you using most of that space?
Fr. Robert: I actually do because I load them up with files that I can pull off the Pie. But I know you like to use 4 GB right?
Brian: I have 4 and I think for my main project I use an 8 and I use maybe 6
Gigs on it, tops?
Fr. Robert: I like a little more storage and it’s so cheap, why not? You’re also going to need a couple of cables. And HDMI cable and a monitor that support HDMI. Because this only has HDMI out. You’re going to need an ethernet cable and an active ethernet jack, something that is actually connected to the internet and finally you’re going to need a little bit of power because you’ve got to turn the thing on.
Fr. Robert: Now Brian. There is one super secret piece of gear that you’re going to need for your new Raspberry Pie rig.
Brian: Super secret? I don’t even know what that is!
Fr. Robert: It’s an Angry Bird. The first step is to download a few files. go to raspberrypi.org and click on the download tab. Get the latest copy of the SDFormatter tool and the latest table release of news. The new out of box software install. Install the SD formatter software and then use it to prepare your SD card. Making sure to check the option to allow it to do a format size adjustment. Copy the contents of the news folder into the root directory of the newly formatted SD card, then plug the SD card into your Raspberry Pie. Connect the mouse and keyboard into the USB ports on the Raspberry Pie, connect the HDMI cord to your monitor and the ethernet cord to your network. Finally, connect the power cable of your Raspberry Pie into your USB power source. After the RaspPi boots you can see a screen that lets you choose your distro. Select Raspbian and click install. The install will take about 15 minutes. Use this time to gauge your progress with the Angry Bird. See the bird. Feed the bird. Glance into the birds eyes and know why it is so angry. Once the install is finished, click okay and the Pie will reboot into the configuration tool. While you’re here, make sure to change the default password by selecting option 2. Your username is now pi and your password is whatever you choose. Next go into option 4 and select your time zone and go back to the main menu and select finish and hit enter. You should now be at the Raspbian command prompt. You need to update the list of packages available to Raspbian. Install Apache, MySQL, PHP5, PEAR, and phpMyAdmin, before you set the Apache Configuration. To update to available packages, type sudo apt-get update. To install apache type sudo apt-get install apache2. To install MySQL type sudo apt-get install mysql-server. In the middle of this installation you’ll be asked to change the root password for the MySQL database. To install PHP5 and PEAR type sudo apt-get install php5 phyp-pear php5-mysql. Then type sudo service apache2 restart. The last installation is a phpMyAdmin. This is the package that will allow you to control your server. Type sudo apt-get install phpmyadmin. It’ll ask you half way through the installation which web server you want to use, select Apache and then select OK. It will also ask you to confirm that you want to use the MySQL database installation that you just completed. Give it the password that you selected and continue. Lastly, it will ask you what password you want to use for the phpMyAdmin page. Go ahead and give it your password. With this first part of the installation done it is now time alter the server configuration. Type sudo nano /etc/apache2/apache2.conf. You need to add the line Include /etc/phpmyadmin/apache.conf. Go ahead and exit the editor by typing control and x and confirming that you want to save the file. Now restart the server with all the changes by typing sudo service apache2 restart. Now let’s test it! Find your IP address. Type ifconfig and you’ll see an Ip address in eth0. Type that address in your browser of choice and you’ll reach a web page telling you that your new web server is up and running. No appending/phpmyadmin/to the IP address, will get you into the phpMyAdmin page where you can see the status of your web server and set permissions to your newly installed services. Now your web server is working but unless you have access to the files that the web server displays it’s not all that useful. To make it useful we need to install an FTP Server. First we need to take ownership of the web root by typing sudo chown -R pi /var/www. Next we need to install the vsftpd package by typing wuso apt-get install vsftpd. Once that has installed edit the vsftpd configuration file by typing sudo nano /etc/vsftpd.conf. You need to make four changes to this configuration file: first, change “anonymous_enable=YES” to “anonymous_enable=NO”. Next remove the comment, that’s the pound sign, from both “local_enable=YES” and “write_enable=YES”. Finally go to the bottom of the file and add the line: “force_dot_files=YES”. Hit control and X to save and confirm the exit. Now start the FTP server by typing sudo service vsftpd restart. Finally we’re going to create a short cut so that every time you log into the FTP server it will drop you into the web server roof. Type ln-s /var/www/ ~/www. Now you can use an FTP client to navigate to your server and change files to properly load up your web server.
Now I understand that’s a lot. In the chat room a lot of people are saying “My head is spinning”. But there is this wonderful new thing that we’ve created. What was it Brian?
Brian: I think it is the pause and rewind button?
Fr. Robert: Yes. The pause and rewind button. No we understand that this is a lot of data which is why all these instructions are step by step in the show notes. In fact they are already up there. As soon as my producer publishes them.
Brian: And edits them and puts them on the web site.
Fr. Robert: So what you need to do while you are watching this video is don’t pay attention to the directions. I leave them in there because there will be people who pause it and then move as they get each step done. But rather try to assimilate the flow, this is how you pretty much do every Raspberry Pie project you are ever going to do. There is the installation of the operating system, initial configuration and then you get the packages for whatever project you are doing. So that’s what we really want you to figure out. You’ve got a lot of ideas for Raspberry Pie projects right?
Brian: Oh yeah, totally. And the only way you can really follow along is to pause. But we have it in the show notes so we are talking about how you can use it. You don’t have to read out slash next time because people are just going to have to look at the show notes and copy them down.
Fr. Robert: We were actually talking to each other during the playing of the video and I was saying, “You know half way through I should’ve just said I’m sorry I’m tired of reading this out, just go to the show note”!
Fr. Robert: TLDR. But again it’s a very interesting project that can be done on very interesting platform. That entire kit was about $60. That included the Pi, the memory card, the USB keyboard and mouse.
Brian: You know how we were talking about how crypto currency wasted energy and everything a Raspberry Pie web server?
Fr. Robert: It’s ridiculously low on energy. You can run it off a USB port on your computer.
Brian: You could have a little solar panel or a battery or something.
Fr. Robert: I’ve actually seen that. Here is one thing though, it is an incredibly low power device. So, if you think that you’re doing to open this up behind your firewall, drive a port into it and make it your public server it will work fine as long as it’s just you or maybe a couple of friends hitting it. But it doesn’t have the resources to take like hundreds or even thousands of hits . So just know that this is a great developed machine. You can run MySQL PHP so you can test to see if your website is going to work before you upload it to something serious.
Brian: Yeah. Just a fun project and like you said, very small price to get into it. $60 minimum.
Fr. Robert: And just remember feed the Angry Bird! Now I understand that you’ve got a little something for us. You wanted to show us a device for time lapsing.
Brian: Right. Well a few episodes ago, I think it was episode 76, I showed the folks how to make a time lapse just using your Go Pro. But I wanted to expand on that in a cost effective method. Go Pro itself is actually pretty expensive but it has a lot of features and I love playing with them anyway. You might’ve noticed that there is something set up behind me here.
Fr. Robert: I hear something ticking. Does he hate me? Am I going to blow up?
Brian: No, it should be fine.
Fr. Robert: Now I’ve seen these before. This is a different kind of time lapse. So the time lapse that we’ve seen before have been a static camera that looks out over a scene and records a liot of time in a very small amount of video. Now that is cool but this kind of time lapse camera actually moves the camera.
Brian: Yeah, it puts a little bit of motion into the video and that makes the time lapse a little bit more exciting you know? So I made a quick video to show you how to do that, but before we get to that we’ll get the overhead out. So at Know How we break things so that you don’t have to! When I first cut the timer, I did not realize you could take the screws out from the bottom.
Robert: So are those parts supposed to be like that?
Brian: No, I don’t think so. I lost some in between.
Fr. Robert: I think the problem is that these are curvy. You need to straighten these.
Brian: One thing I realize is that I’m never going to be a clock maker because as soon as I pulled this off I just gave up.
Fr. Robert: And this is because you didn’t call Padre. Because Padre could’ve told you don’t take off the top.
Brian: I don’t need Padre for everything. Fortunately, though, Tony or Tony’s fiancé I believe went to IKEA the very next day and bought me two of these. If you go into the store they are only $6. Pretty basic egg timer and fortunately if you don’t know how to use an egg timer, IKEA supplies instructions and every language. So if you’re kind of confused on how to use it, don’t worry if you don’t speak English don’t worry, it comes with instructions! Let’s watch the video.
Brian: To begin this project you’re going to need a timer from IKEA. This little guy, the Ordning Kitchen Timer from IKEA runs about $6 in the store and if you order on Amazon it is $12. So go into the store if you can. The next part you’ll be needing is a 3/8 inch to 1/4 inch grommets. Now here at Know How we dedicate ourselves to breaking things so that you don’t have to. I took apart this first timer and, well, it didn’t turn out so good! I’m not going to be able to put that back together for sure. But anyway, we’ll use it as a test bench for our un-ruined timer. So the first thing is that I’m going to use this IFixIt kit to pull off some of this adhesive foam on the bottom and reveal three screws which you can remove and then pull off the bottom plate. That’ll leave the plastic bottom exposed and only one screw left to take out to completely take off from the rest of the timer. Now this way I can drill through the timer without damaging any parts. I’m going to do some quick measurements and use a marker to make sure that I have this hole centered. Next I went down to the TWIT basement and used the drill press and with a 5/16th drill to make my hole. It was just a little bit smaller than what I need for the grommets so I also used a different bit to kind of widen the hole a little bit and then I was able to slit the grommet in just fine. Use a flat headed screw driver to get it in the rest of the way. It was a little off center when I had it screwed in so I just tapped it a few times with the hammer to make sure it sat flush against the bottom of the plate. Next I put the screws back in to hold the bottom plate to the timer and Voila! We have a little grommet that we can now use to mount to a plate for a tripod. Now to attach the GoPro you are just going to use a little sticky mount that a lot of GoPro’s come with as accessories. So I have the tri-pod up high in the studio during TNT, I was able to get his 13 second clip by using two second picture mode on the GoPro and as with any time lapse watch out for photo bombers. Especially Jason Howell! He has a tendency to want to be in front of the camera a lot!
Fr. Robert: What I love about that is that this is cheap. This is crazy.
Brian: Yeah, $6 from IKEA and $12 from Amazon. And super easy to set up and it turned out pretty well.
Fr. Robert: And those little grommets we actually found on Amazon for 10 for a buck. Get yourself a couple. It is actually surprisingly good quality. It gives you a really nice pan.
Brain: When we first were going to do this project we thought “Why stop at a GoPro, why not do a DSLR”? But it’s a little too much for that. But GoPro is just the right amount of weight and set it to two second and you get that smooth 360 pan. Set it for an hour.
Fr. Robert: We actually tried earlier on just putting a standard JVC camcorder on it was really sad because you heard “tick, tick, tick,….” and it was a little too heavy. Now the other idea we had was putting a grommet on the bottom and on the top so that you could mount it underneath, like an eave. It was upside down this might be able to support the weight.
Brian: Yeah. As I took apart this timer there’s not a lot of space on the top to drill down. And if you’re going to drill through it, you’re going to have to take it off and when do that…. BOING!
Fr. Robert: Yeah. On a future episode of Know How maybe you can show them how to reassemble it!
Brian: Yeah! Everybody is clamoring how to put back their timers after that episode!
Fr. Robert: Drop by IKEA for the egg timer because it will be $6 there. It is $12 on Amazon. Get the grommet and hopefully you’ve got all the drilling equipment at home in order to be able to do this. It is a very cool project.
Brian: So chicken hear 21 in the chat room just had a great idea. Use a Raspberry Pie with a camera adaptor.
Robert: That is actually a future project. What we’ve got is we’re creating - well,
should I tell them this?
Brian: Yeah, go ahead.
Fr. Robert: We are creating a bore that runs a screw via a Raspberry Pie so that it will move the time lapse camera this way. So rather than circular pan it is a linear pan. Very cool. Again, it is one of these things that you can do for relatively low cost which give you a big wow factor if you are making contact.
Brian: I like putting videos together with time lapse. So we’ll do more of them.
Fr. Robert: What do we have next week? Next week we’re talking about dancing lights right? I’ve got a project that uses a 1031 C transistor.
Brian: Something with sound control?
Fr. Robert: Sound control, right. I call it dancing lights because it sounds cool. What are you working on?
Brian: I will be working on a Linux USB boot so you can take your OS wherever you want.
Fr. Robert: How about that? Well until then the first thing we’ve got to tell you is that we know these projects can be a little daunting and are kind of confusing because we go through them quickly because we can’t do everything in real time. But you can always find everything we do in great detail in our show notes. We actually give you the step by step play which is important when we do something like the Raspberry Pie. Brian, where can they find our show notes?
Brian: Well you can find them at twit.tv/kh and that’s where all of our show notes, episodes, subscribe links, but if you’re not content with that… but wait there is more. You can email us at if you have any questions, ideas for shows. Or even better you can go to our community that has almost 6,000 members.
Fr. Robert: We’ve got our Google plus community at gplus.to/twit.kh Now the nice thing about this community is that it is almost 6,00 and is growing every single week. People actually help one another. AT the beginning it would be the host that would jump in and start discussions. There have been discussions in there have started and concluded without any interaction from us. So you get a lot of smart people that like hacking things together. It is a nice place to be. And it is kind of polite. Strangely polite.
Brian: Keep it up guys.
Brian: And you can find me on twitter @Cranky_Hippo and there is a story behind that I’m not going to get into today but that is where you can follow me on Twitter. I’d like to say thank you to our, for now, temporary TD, Alex.
Fr. Robert: Yeah, you may have noticed that Brian was the TD for KnowHow and our new TD has done an extraordinary job - Alex, can you take a bow for a second here? Actually, he won’t do it.
Brian: You can’t see him, but he’s bowing.
Robert: No he won’t do it. We’re going to get him too, eventually. He’s shy, but Alex is the flow master for the
Twit brick house and we are happy to have him aboard the team. Do you think maybe that is it?
Brian: That’s it. So now the audience should know how.