Open School Games

Much More






Talk to us on Facebook

Delicious Bookmark this on Delicious

Follow OpenSchoolGames on Twitter

Join the Blue Ribbon Online Free Speech Campaign Valid XHTML 1.0 Strict Valid CSS!

Think

Read

Write

Code

Read

What shall we read? I am interested in learning how to program a Raspberry Pi.1 I want to brush up on my understanding of how computers work, so I am rereading Charles Petzold's Code.2. Code takes me back to trying to communicate by secret signals with a flash light. I am hoping the Raspberry Pi can help me get back to that feeling of childish wonder when we discover that a little electricy channeled through an electronic circuit can allow us to transcend ordinary human limitations.

Write

Pencil drawing of Alice

I need help here. I have written a little piece about using breadboards to build simple electronic circuits but it does not seem like something that Alice would enjoy reading. Can you help make this introduction to breadboards interesting? Post ideas to Facebook

Code

In the spirit of getting back to basics let's build a very simple logic circuit. No matter how complex, every computer program has simple yes/no logical statements. We call these boolean conditions. If you have ever flipped a light switch, than you have ran a computer program. At my house the switches are positioned so that down turns lights off and up turns lights on. If we think about these as little computer programs we can imagine that down means false and up means true. This is fun and useful since I can answer any yes/no question with a flick of a switch but we can do more. If I have two switches both connected to the same light in parallel I can form a boolean OR condition.

A breadboard with a boolean OR circuit

If we can create an OR condition with parallel wires we can create a boolean AND condition with wires in a series.

A breadboard with a boolean OR and a boolean AND circuit

To help keep track of what is going on let's label the buttons.

A breadboard with a boolean OR and a boolean AND circuit

The wiring on the finished board represents this code statement:

if ((A OR B) AND (C AND D)){
   enableLight();
}

    Tips for helping a young student
  • Press the buttons into the breadboard. Jumper wires are easy to work with but the buttons can be a little tricky. You will need to squeeze the prongs on the buttons just enough to get them to go through the holes in the breadboard. Also notice that the prongs are in pairs. You will want to make sure that each connected pair gets pressed into the same breadboard node. If the button behaves as if it is always pressed, you will need to pull the button out and rotate it 90 degrees.
  • Remind your student that current will only flow through the LED3 in one direction. The long prong on the LED should be pressed into the node closest to the connection to the positive bus.
  • Use a resistor to limit current flow. In these picures I have used a 220 ohm resistor and a variable voltage source set to a value just large enough to make the LED light up.

Young student demonstrates pushing buttons A and B on a breadboard to make two lights shine.

References

  1. ^ Raspberry Pi Quick Start Guide
  2. ^ Code by Charlies Petzold
  3. ^ What is an LED?