Friday, September 14, 2012

My First Adventure with the Raspberry Pi

My adventure with the Raspberry Pi begins by finding and purchasing it from Newark Element14.


Looking at the system you can see that it is a credit card, sized unit.

I purchased a pre-loaded 4 GB SD card but I also had a spare 4 GB SD card so I downloaded the distro from adafruit and used it.

I then hooked up a USB keyboard and an HDMI cable to my TV and booted the Raspi up.


After doing that I wanted to start messing with the General Purpose Input/Output (GPIO) pin set on the Raspi so I purchased the Raspi Cobbler from adafruit.

Upon investigation, I realized that I needed to solder the pins on the cobbler before using it. Moreover, I realized that I needed a breadboard as well. Adafruit's site had a tutorial that provided the steps in what to solder and where. That was a great help so I printed that tutorial. Based on the tutorial I also purchased a solder gun, solder and breadboard from Amazon and was then ready to get busy.


After soldering the pins and connecting the data ribbon I knew that I needed to find tutorials on what to hook up to what pins, etc. and then purchase those items. What I wanted to do was to conduct the easiest experiment that I could as a first step. I thought, why not get an LED to light up. Perhaps I would find a tutorial on adafruit that was get me there. And yes, the Raspberry Pi E-mail Notifier Using LEDs tutorial was the answer.
Gleaning from the instructions of the tutorial I knew that I needed to setup Remote SSH and install python on the pi. After doing that I read further and noted that I would need to purchase two resistors from 100 ohm up to 1000 ohm as well as a green LED and red LED as well as breadboard wiring. I found that I could get the wires off Amazon for a cheaper price and so made that purchase. The resistors and LEDs I purchased at the local Radio Shack for a good price.
Below is the result thus far.

Now that I had what I need to physically test the next step of the tutorial was to create a python script to interact with the GPIO pins. I was not wanting to take the additional steps of using an IMAP feed parser as detailed in the tutorial I created enough to be able to light the LEDs in a flashing fashion. Here is the code:

I ran the script and here is the output to the screen from the pi:

However, I did not see the LEDs lighting up. Then I realized that I did not have the ground wires connected to the breadboard ground rail. After making the correction I had flashing lights.
Now, what is the next step?