Teaching Kids About the Raspberry Pi

photo-21The Raspberry Pi was made to teach kids about computers. My little brother Paul has been doing fun stuff with the Raspberry Pi like I have, so for a school project, he taught his class about the Raspberry Pi. The picture here shows my brother teaching his class. His friends really enjoyed his presentation, and hopefully some of them will at least consider doing something with the Raspberry Pi.

Sorry I haven’t been posting a lot lately. I’ve been learning more Python on Codecademy and making lots of Scratch programs(more on Scratch soon). I love to program, and I’ll work on my project more soon.

Sending a Text With Email

My dad and I were doing some research when we came across this website: http://www.att.com/esupport/article.jsp?sid=KB63037&cv=820&title=#fbid=jAsra7Fjgvt

Here’s what we found on this website:

“Send a text message from email to an AT&T wireless device

To send a text message to an AT&T wireless device from your email, address it to the recipient’s 10-digit wireless phone number, followed by @txt.att.net, (e.g., 5551234567@txt.att.net). You won’t need to include dashes or spaces in between the numbers.
To send a picture or video message to an AT&T wireless device from your email, address it to recipient’s 10-digit wireless phone number, followed by @mms.att.net, (e.g., 5551234567@mms.att.net). You won’t need to include dashes or spaces in between the numbers.”

This means I can send a text using email! With this knowledge, I can simply put a new address into my Python program, and I’ll be able to text my mom instead of emailing her. This is good for my project, because my mom will be able to see a text faster than an email, so if there are birds on the cove, she’ll know right away.

Success With Sending Emails

Today I did some work with the Raspberry Pi, and I figured out how to use Python to send an email!

First, I learned how to send an email using the command line. I got the code here. Second, I tried to use Python to send an email using the code here. Unfortunately, that didn’t work, so I tried the code here. Luckily, this code worked! All I had to do was modify it so it had the correct email addresses, message, and subject. I’ll eventually make this code a function so I can use it in my program for the bird detector. If you looked at my list in an earlier post, you’ll see that this was Step 5. Next, I’ll probably try to detect motion using the Raspberry Pi camera or control the Raspberry Pi camera using Python.

Video Links

As promised, here are the links to some of the videos I took using the Raspberry Pi camera.

http://youtu.be/vDbl8RW7FDM-first video

http://youtu.be/y3Y1cGevmOA-lake with nothing on it

http://youtu.be/ApLYlD5RdNA-bird swimming in the cove

http://youtu.be/mtf3t1dbpyQ-my little brother acting like a bird

These videos aren’t particularly exciting, but some of them have motion in them that I can use while making my bird detector. These videos are the first steps in finishing my project.

Breaking Down the Problem

When you have a big problem to solve, the first thing you should do is break it into manageable pieces. That’s why to help me solve my bird-detector problem, I’ve broken the problem into steps. Here’s what I’ve come up with:

  1. Use Python to control camera.
  2. Use camera to detect motion.
  3. Use Python to detect motion.
  4. Modify Python program to only detect birds.
  5. Use Python to send an email or text message.
  6. Modify Python program to send an email or text message when it detects birds.
  7. Modify Python program so it works at the lake.
  8. Mount Raspberry Pi and camera at the lake and start the program.

I think I’m going to start by solving problems 2 and 3, because if they don’t work, nothing in the program will work. Wish me luck!

Lake Photos and Videos

I recently went to my Lake House. While there, I used the Raspberry Pi camera to take some photos and videos of the lake and birds on the lake. I want to use these as test photos so I can get started on my project. I think the first step in completing this project is to detect motion using the Raspberry Pi. My dad and I know about a few motion-detecting programs we could use for this project, but we’re not yet certain which one we’ll use.

I’ll post the videos on youtube soon and put up a link here.

First Photos

first

 

My first photo with the Raspberry Pi camera!

A few weeks ago, I managed to take my first photos using the Raspberry Pi camera I got recently. I’m sorry that I haven’t posted for a while, but now that I’m not doing many activities I’ll have more time to post.

The picture you see posted here was taken using the Raspberry Pi camera I have. Here’s another photo I took with it.

garage

As you can see, the camera takes pretty good long distance photos, as well as photos up close.

Christmas in April!

photo-19

A few days ago, Mr. Jim, one of my dad’s friends, came over to my house to see my Raspberry Pi. He brought me lots of electronic toys, including the toys you can see in the picture here. My dad and I would like to hack into some of these toys with the Raspberry Pi and see what cool things we can make them do. Before that, though, I’m going to have to finish my bird detector, but after that, I sure won’t be bored!

Camera Module Forum

On raspberrypi.org, Liz, one of the founders of the Raspberry Pi, has created a thread for the camera competition winners. Here’s the link: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=43&t=39970

If you scroll all the way down, there will be a button that says “Return to CSI camera module”. If you click this, you will see other forums people have created about the camera module. The one by mappler is by my dad. On the forums, my name is aappler. The forum mentioned in the first paragraph is helpful if you want to keep up with the progress of the other camera contest winners. I suggest you take a look at it!

My Camera Is Here!

photo-18My camera came today! You can see my eleven year-old hand holding it in the picture on the left. Now that I have my camera, I can get started on my project.

Sorry that I haven’t posted a lot lately. I do a program called Odyssey of the Mind where teams solve a problem and present their solution by making a skit. My team won at our regional competition, so we get to compete in the state competition. This is exciting, but it means I have to spend a lot of time working on Odyssey of the Mind and I don’t have a lot of time for Raspberry Pi work. The state competition is this Saturday, so after this weekend I’ll be back to doing Raspberry Pi work.

I can’t wait to start using my new camera!

I Won!

image

raspberrypi.org recently had a contest in which the winners won a pre-production camera board (pictured here). To win, you had to tell the people at raspberrypi.org what you would do with the camera board. They wanted cool, interesting ideas that would test the camera board thoroughly. Nearly 700 entries were sent in, but only 10 people could win the contest. I was one of those 10 people! My idea was to make a bird detector. Here’s what I said about it in my entry:

“I have a house on a lake, and my mom loves it when birds come in the cove near our house. I want to connect a camera to my Raspberry Pi and have it detect when there are birds in our cove. When it detects that there are birds in our cove, I want the Raspberry Pi to notify my mom by sending her a text message or email so she can come outside and look at the birds.

This would definitely be a challenging project to do, but I’m excited to give it a try!”

Now that I’ve won the contest, I better start thinking about how I’m going to do this project!

Pi Plate

photo-16 My dad recently got a thing called a Pi Plate. It connects to the Raspberry Pi and gives the user many more GPIO (general purpose input/output) pins to hook things up to the Raspberry Pi with. If you look in the picture, you will see a big blue board on top of our Raspberry Pi. That is the Pi Plate. The Pi Plate was made by Adafruit. Here’s another picture of the Pi Plate up close:

photo-17

As you can see, there are lots of holes you can plug things into. This Pi Plate will be very helpful in future projects.

Happy Pi Day!

Hey, everybody! Today is Pi Day! Pi is a number that you get when you divide the circumference of a circle by the diameter. Pi is a nonterminating, non-repeating decimal. Pi=3.14159265358979 and so on. Today is Pi Day because it’s March 14, or 3/14. Have a very happy Pi Day, everybody!

Codecademy

Codecademy is a website that teaches people how to code. Codecademy is free. I’m currently using Codecademy to learn Python, a language you can use on the Raspberry Pi. I found out about Codecademy from the Raspberry Jam my dad and I attended online. A girl named Amy Mather (age 13) was talking about a project she did with the Raspberry Pi, and she said she learned Python from Codecademy. Codecademy is fun and easy to use. When you start to learn how to code, Codecademy assumes you have no prior knowledge in coding, so it tells you everything you need to know! If you want to learn how to code, I suggest you try Codecademy.

Raspberry Jam

On Saturday, there was a special event held in Manchester, UK called a Raspberry Jam. A Raspberry Jam is when lots of Raspberry Pi experts talk about the Raspberry Pi to people who either used the Raspberry Pi or are interested in learning how to use one. I woke up at 5:30 A.M. on Saturday so I could watch the Raspberry Jam live (UK time is 5 hours ahead of my time here in Virginia). My dad had signed us up to attend the Raspberry Jam online, so we could watch the Jam and send in questions by using Twitter. If you’re interested in attending future Raspberry Jams, here’s a link to a site that tells a bit about them and how to sign up for one: http://www.raspberrypi.org/archives/tag/raspberry-jam If you’re into the Raspberry Pi, I suggest you think about attending a Raspberry Jam, either in-person or online. It was really helpful to my dad and me. We have lots of good ideas for new projects and a better idea of just how much our Raspberry Pi is capable of. I hope a Raspberry Jam can do the same for you.

Here are some links to some of the websites mentioned in the Raspberry Jam:

Geek Gurl Diaries-video tutorials of things you can do with the Raspberry Pi.

Laser Bots-a cool video of a project done by university students using the Raspberry Pi. You have to watch this-it’s super cool!

Tank Project-Another project done by university students.

Turbo Scalextric-Another project done by university students.

Pi Moble Phone Controlled Arduino Rover-Another project done by university students.

Codecademy-A website that teaches people how to code. (I’ll talk more about Codecademy in another blog)

I hope you enjoy looking at some of these websites!

Snow Time Lapse Video

Today, my dad and I took lots of pictures. Tonight, we put them together using iMovie and made them a time lapse video. We put the final product on Youtube. As promised, here’s a link to the video: http://youtu.be/EN09vNAm6GM

As you watch this video, look at the roof of the playground in the righthand side. The snow slides off of it, and it looks really cool.

I hope you enjoy watching our time lapse video!

Time Lapse Photography of Snow

Time Lapse RigThere’s a snow storm coming, so my dad and I decided to make a time lapse video of the snow falling. This is a picture of the rig my dad and I set up to take photos of the snow. Every 20 seconds, the Raspberry Pi will send power to the infrared shutter release (taped to the piece of wood on the table). The infrared shutter release will tell the camera (bottom right corner) to take a picture. At the end of today, we’ll take all the photos we took and make them into a time lapse video using a program that makes photos into time lapse videos. Hopefully, this will result in a really cool time lapse video of the snow falling. Once we finish the video, we’ll post it on Youtube and I”ll post a link to the video.

 

Time-Lapse Photography

Now that we’re just about finished with water drop photography, my dad and I are starting to think about what our next project should be. We’ve thought about it a little, and here’s what we’ve come up with: time-lapse photography.

Time-lapse photography is when you take pictures over a period of time, then put them together and make a video. There are programs you can use to put pictures together and make them into a time-lapse video. This can be really cool because every second of video could end up being two hours in real life.

My dad and I aren’t certain what we’re going to take pictures of, but some of our ideas include planting a flower seed and watching it grow, getting an ant farm and watching the ants dig tunnels, and taking pictures of a sunset. When we figure out exactly what we want to, I’ll write about what our plans are.

Electromagnet

What is an electromagnet and how does it work? The answer to this question will help you better understand what happens in a relay and why it works. My dad and I did an experiment to find the answer.

The picture above shows an iron core nail wrapped in wire. When the ends of the wire are put onto opposite sides of a D cell battery, the nail becomes magnetic! This is an example of an electromagnet. Here’s a quote from http://www.electronicsteacher.com/succeed-in-physical-science/magnetism/electromagnetism.php that explains how electromagnets work.

“When electricity passed through a wire, a magnetic field is created around the wire. Looping the wire increases the magnetic field. Adding an iron core greatly increases the effect and creates an electromagnet. You can create an electromagnet without and iron core. That is usually called a solenoid.”

Basically what the quote is saying is the wire creates a magnetic field around the iron core nail, causing the nail to become magnetic. Did you see that the quote mentions a solenoid? The valve we used in our water drop photography was called a solenoid valve because it has an electromagnet inside of it.

Inside a relay there is a coil wrapped around an iron core and a switch. When power is given to the coil, the iron core becomes magnetic and the switch snaps shut. The switch closes because it is drawn to the electromagnet. When the switch is closed, the circuit is complete and electricity can flow. When power stops coming through the coil, the iron core is no longer magnetic and the switch opens, making it impossible for electricity to flow through the circuit.

If you want to try the experiment my dad and I did, all you need is an iron core nail, a wire, a D cell battery, and something metal that will stick to the electromagnet. Good luck if you decide to give it a try!

Water Drop Photos


All of our pieces are put together and our programing works great! Today we took a bunch of water drop photos. The photo above is one of many photos we took. Here are some other ones we took.DSC_0218 DSC_0238DSC_0253DSC_0265

Now, I bet you’re wondering how we took these photos. Here are some pictures of the rig we made to take these amazing photos.

photo-11

 

photo-13photo-14

The first picture shows a bottle connected to the solenoid valve. The bottle is filled with water, and when the solenoid valve is opened, the water in the bottle goes through the solenoid valve and exits the solenoid valve. This process is similar to what a sink does. The next picture shows a camera and a bowl of water. Remember the infrared shutter release I was talking about in earlier posts? It’s connected to the Raspberry Pi, and it tells the camera exactly when to take a picture of the water drops. The bowl of water is what the first water drop bounces off of. If you look back at the water drop photos, you can see the bowl in the bottom of the picture. The last picture shows the whole rig hooked up and ready to go. See the little rooster-shaped thing holding the pipe onto the table? The infrared shutter release is taped to the bottom of it.

This is really cool. I took us a long time to get the programming just right so the drops and the camera did everything when they were supposed to. I hope you enjoyed looking at the cool pictures we took. I’ll put up photos of things other than just water soon.

 

 

Camera & Solenoid Success!

We finally got the camera and solenoid valve circuits working! Above is a picture of the circuit we built and tested. I’ve already told you in a previous post how our old camera control circuit worked, and this one is pretty much the same. As for the solenoid valve circuit, here’s how it works:

A brown wire runs from the Raspberry Cobbler to the red wire on the other breadboard. This red wire is connected to a one kilo-ohm resistor. The resistor is connected to the base of an NPN transistor. The emitter of the NPN transistor is connected to ground. The collector of the NPN transistor is connected to one side of the coil in the black relay. The other side of the coil is connected to a twelve volt power source. The switch in the black relay is connected to the solenoid. It switches power to the solenoid. When power is switched to the solenoid, it will release water.

We solved the problem we were having with our transistor. There was too much current flowing through the transistor, so we used a relay to handle the high current of the solenoid.

We wrote the program to control the infrared shutter release and the solenoid valve in Python. Once all our circuits were hooked up, we ran the program, and it was successful!

Burnt Transistor

My dad and I were testing a circuit we’d made to control the solenoid valve(the thing we’re going to use to drop water), but we couldn’t get it to work. At first, we couldn’t figure out what was causing the circuit to fail, but we eventually smelled something burning. We figured out that we had burnt the diode, but this diode was a safety feature, and the circuit should’ve worked without the diode. My dad was thinking about this and he finally came up with the answer to our question.

My dad looked up the amount of current our NPN transistor could have flow through it. He said it could have 200 milliamps flow through it. Now, you have to understand, one amp is a lot of current. In our circuit, we had 1 amp, 1000 milliamps, flowing through our transistor. All that current burnt our transistor. Without the transistor, our circuit couldn’t work.

We’re still not entirely sure how we’re going to fix this problem, but when we do, I’ll write about it.

Camera Control Success

To activate the camera in our water drop photography, my dad and I are going to use an infrared shutter release that will tell the camera to take a picture. We wired the infrared shutter release up to the Raspberry Pi, and when we run the program we made in Python, the camera takes a picture! The picture above is part of the circuit we made to control the camera. We used the program we made to take the picture above.

The circuit we made consists of a few different parts. The T-shaped blue thing in the picture above is called the Raspberry Cobbler. It connects the circuit to the Raspberry Pi. The yellow wire is connecting the output pin of the Raspberry Pi to a resistor. The resistor causes less current to flow. Without a resistor, too much current would flow causing the circuit to blow. The resistor is connected to the “base” of an NPN transistor, the black thing with three legs. The emitter of the transistor is connected to ground by the purple wire and the black wire, and the dark green wire connects it to the other part of the circuit(in the picture below).

The dark green wire towards the top of the picture below is the same wire you saw in the picture at the top of the page. The two black wires you can see are connected to the infrared shutter release. Inside the reed relay(the blue thing) is a switch. When I run the program, the circuit gets power and the switch closes. This powers the infrared shutter release and tells the camera to take a picture. The orange, brown, and yellow wires connect the parts together so the electricity can flow. The little black cylinder is called a diode, and it’s there for safety reasons. Without the diode, the reed relay could damage the circuit.

DSC_0037

I’m so happy we finally got this working! Check back soon for more updates on our progress!

Water Drop Photography

I recently got a small computer called a Raspberry Pi(shown in the picture above). The Raspberry Pi is around $25 and was made specifically to teach kids more about computers. My dad and I set up the Raspberry Pi. We want to use it to do water drop photography. We’re going to make a program that, when run by the Raspberry Pi, will drop one drop of water into a bucket of water, wait a moment, then drop another drop of water into the bucket. The first drop will bounce off the water in the bucket and hit the second drop of water. When the two drops hit, they will form a cool umbrella-like shape. At this time, a camera will be triggered and it will take a picture of the beautiful shape.

I’ll post updates whenever we make progress. Check back every few days to see how we’re doing!

Here’s a link to the website we got the idea to do water drop photography from: http://davidhunt.ie/?p=2770