Monday, November 25, 2013

Playing with SSH

     Monday, and its back to school.  Today, I have got my SD card installed in the RPi.  I've connected all the cables, plugged in the Keyboard, which I hate because its like typing on a phone.  I am using it though, for the mouse touch pad.  I have my USB hub connected and I even put my KVM switch on my computer and the second monitor at school.  (To use it with the RPi, though, I'll have to bring in an HDMI to VGA cable.  The KVM doesn't accept HDMI.)

     So, I've turned the RPi on and booted it up.  I've gone through the process of doing the first boot setup.  No problems with this at all.

     Next step is starting to get the programs to run the GPIO and sensors.  First thing I've had to do is get the Terminal (command prompt) open and start using the "git" program.  this makes the RPi go to various repositories and get (git?) programs that I tell it to.

I am using the tutorial from Adafruit.

Code:
sudo apt-get update
sudo apt-get install git

So, all is good so far.  next, I'm gonna check out the repository at Adafruit.

This part is pretty mindless, actually.  It's just typing in the code.  Or, if I use Putty to SSH into the RPi, I only have to copy/paste the code.

So, after a little bit of messing around to figure out why I couldn't SSH into the RPi, I discovered it was because I needed to log in as pi, not as raspberrypi, though Putty.  So, now that I am SSHed into the RPi, things will go much easier.  I don't have to type out all the code.  All I have to do is copy and paste.

This installs everything to drive the GPIO on the RPi.
sudo apt-get install python-rpi.gpio

Next, the code to install I2C, which allows one chip to talk to another.

So, bunch of different things put on the RPi now.  I have hooked up one of the sensors, (a DS18B20 Temperature sensor) and it is, right at this moment....23.625 degrees Celsius,  Finally, I've got this thing to do what I want.  that is gonna be it for today.  Tomorrow, I'm gonna try to get the script working so it will report the data continuously.  And also, get the other sensors up and running.


Saturday, November 23, 2013

OS, start-up, and setup

So, went and bought an 8G SD card yesterday because I can not, for the life of me, find my case of SD cards.  This card will hold about 3G of OS and things and the rest will be the hard drive for the RPi.

For the Operating System for the RPi, I will be using a Debian distribution made specifically for the RPi:  Raspbian.  I've put this on the SD card already so now I only have to plug it in and start with the setup.  Of course, it would help if I had brought the power source for the RPi to school with me.

I am on the lookout right now for a site that will host my weather reporting.  I have found a few that look promising.  This one deserves more looking into as does this one.  Wunderground lets you upload your own data, it seems, without have the requirement of having a certain type of pre-made weather station.  So, I am leaning that way.

Breaking for now, and will finish this when I get home in an hour...

Got home and didn't do a thing.  now, its after midnight.  Wife got home from sorority and went to lock up the chickens.  Came back in yelling for me to get my shoes on and get out there.  Something got 4 of them.  Bodies still worm.  Moving.  I had to grab 2 of em and swing em by the neck to finish them.  They wouldn't have made it anyway.   Now sure what would kill them around here and jsut leave them.  They weren't even eaten at all. 

So, I might be missing a day or 2.  Just because I can.  And because I'm kinda pissed at whatever killed em.

Thursday, November 21, 2013

Equipment



The equipment:
The gear I will be using for my project is listed here.

Raspberry Pi, Model B:

Processor:  ARM11 Family processor, 700 MHz, can be dynamically overclocked to 1GHz.

Memory:  512 MB RAM, can assign from 16 – 256 MB to the GPU dynamically, 400MHz clock speed.

Outputs:  HDMI, 2 x USB 2.0, Composite RCA, 10/100 RJ45 Ethernet.

Storage:  There is none, just as there is not an OS on the computer.  You have to use an SD card with the OS on it, and the extra space on the SD card is the hard drive.  This makes it easy to switch between Oss without having to dual boot.

Operating System:  I have decided to use the Raspbian OS.  This OS is based on Debian but is thinner to run on the RPi.  It was released in July 2012 specifically for the RPi.

Power:  5V MicroUSB (700mA/3.5W), Power over Ethernet (PoE), or through the GPIO.


Peripherals:
Keyboard:  Favi Mini Wireless With Mouse touchpad.  (Banana for scale)


USB Hub:  Belkin powered 4-slot USB 2.0 hub.  Model F4U040 .  Powered because powering a USB hub with the RPi itself can draw too much energy from the RPi, causing it to shutdown.

Sensors:  I'll be using a variety of sensors for my project.  


A: Barometric Pressure/Temperature  B:  Luminosity  C:  Analog to Digital circuit

A:  Yellow 7-seg display  B:  DS18B20 Digital Temp sensor  C:  DHT11 digital humidity/Temp


I will also be using a camera so the students can see the chickens.  But, I haven't gotten the camera yet.

Power supply:  The RPi will be powered by a Motorola microUSB travel power supply.

* Note on peripherals:
If you are going to be starting into a project with a RPi, you should be aware that not all things work with the RPi.  You can look on this list to see if it is verified.  Just because it isn't verified doesn't mean it won't work.  But why take the chance that it won't?

So, tomorrow, I'll be setting up the SD card and getting the RPi up and running.  Getting it ready to start loading on the various things I will need to run the sensors.  (This is the part I'm dreading...)









Wednesday, November 20, 2013

The Techno Chicken Coop

     So, as part of my IT class, I have to do an independent project.  So, I have decided to set up a chicken coop monitoring station.  Weather, that is.

     The whole concept behind this, and the driving force is, the Raspberry Pi.  It's a small computer (the foot print is credit card sized.) that really lends itself to prototyping electronics.   That is to say, you can hook up sensors to it for nearly anything.  I'll be hooking up 2 temperature sensors (one inside and one outside), Barometric pressure (outside), humidity (inside), luminosity (inside), and a camera for the viewing of the chickens.  All of this will be accessible online so the students at my daughter's school can access the weather data and view the chickens.  Living close to the Washington State Fair, they have a farm block every year in the curriculum. 

Raspberry Pi
Model B:  700 MHz processor, can be overclocked to 1GHz, 512 MB RAM


Pi Crust
The Pi Crust is placed on the GPIO (General Purpose Input Output) pins to ease use of the interface.  I will also be using a breadboard to expand the GPIO even further as shown directly under here.


RPi with Pi Crust, ribbon cable, and breadboard
This is the Raspberry Pi with the Pi Crust mounted on top.  It also has the ribbon cable attached to the GPIO and leading to the Pi Cobbler (To interface with the breadboard).

Tomorrow, I'll be starting in with the Operating System and working on getting Python going on the Pi.  (Python is the programing language I'll be using to interface the sensors to the RPi.)