Sunday, November 30, 2014

It's alive!

I got back from Thanksgiving travels today and took a couple hours to play with the Raspberry Pi. Below is a picture of all the various bits and pieces that came in the kit.

It was relatively simple to put it all together. The first time putting it all together, I forgot to put the SD chip in, and it took me about 5 minutes to figure that out. One thing that's nice about the Raspberry B+ is that it has more USB ports than the other models. This meant that my worrying about needing a hub was all for nothing. I actually have four USB ports to work with. This meant that I had room for the USB keyboard and mouse from my old desktop, plus the wifi dongle, and I still had one port left to spare.

I attached the Pi to my TV via HDMI for the initial setup. Everything was pretty much plug-and-play through the initial setup. The SD chip came with NOOBS installed, which is a slightly different starting point than either of the two books gave me, but in the end the OS is still Raspbian.

Setting up the wi-fi was pretty straight-forward. There was a link on the desktop that helped me to enter the network password and get connected to the internet.

My first task was to try to SSH into the computer. This actually required virtually no setup. The only thing I needed to do was make sure that the SSH server was activated in the raspi-config. The only other thing was to figure out what the correct IP address for it is. It was easy to look up the address on the Pi, but in the end I'm going for the headless operation, which means that I'll need to find it on my network from my laptop. I've unfortunately forgotten the administrative password to my router, so I'm going to have to ping around to find it. I'm using Putty as my SSH client from my laptop.

My second task was to try to get the Pi to run a VNC server so that I can use the graphical interface if I so choose. This was a tiny bit more complex, but not so much so. The instructions are here: http://elinux.org/RPi_VNC_Server. It took me a couple tries, probably because I mistyped a command or two. But after getting it right, I was able to connect from my laptop using VNC Viewer from RealVNC Limited.

I've got some other things to do tonight, so I'm going to pick it up again in a day or two. But I will need to see if I can log in again from the laptop and run headless. At that time, I'll write up the steps I'm using to do it. From that point, I think I'll move on to playing with the GPIO pins.

Wednesday, November 26, 2014

Reading time is over

As anticipated, I finished reading the Getting Started with Raspberry Pi on the plane. When I get back home, it will be time to actually get on the Raspberry Pi and see what I can do with it.

There are a few things that I learned that I think will be very useful.

  • Running Headless: This just means running the Raspberry Pi without a keyboard, mouse, or monitor connected to it. This can be accomplished by either setting it up as an SSH server or a VNC server. (Page 29)
  • Interacting with GPIO from the Shell: Both books discussed using Python to use the GPIO pins, but this book explained how to do it from the Linux shell. This gives access to writing shell scripts to do stuff (for example, with cron -- which is also something that I just learned about).
  • Connecting a Webcam: I don't know how this is useful, but I'm pretty sure it will be if I start to build projects. I can see some time lapse stuff being a possibility.
  • Connecting through the Internet: This may seem like nothing, but this book gives a simple example of a device that allows you to turn a lamp on and off through the internet. I think knowing how to do stuff like that might be pretty handy.

So... I guess I'm ready to start tinkering. When I get back, I'll take a quick inventory of the pieces in the kit that I bought and start trying to do a couple of the sample projects, or at least a modification of one of those projects.

Monday, November 24, 2014

What's an Arduino?

Chapter 6 of Getting Started with Raspberry Pi talks about Arduino. I've never heard of this before, but it's apparently another small computer that can be hooked up to the Pi. They're framed as being complements of each other, but since I didn't know about it and I barely know my Pi (still in the box -- and will probably remain in the box until after Thanksgiving) I don't really understand the connection.

But this did make me think about the financial investment that I might end up making in the end. I've already decided that I'm not going to particularly stingy about what I buy, but that doesn't mean that I'm just going to buy absolutely everything. Here's what I have so far:

  • CanaKit Raspberry Pi B+ Ultimate Starter Kit ($69.95): I went with the big kit because I don't have any electronics components to begin with. Starting with at least a somewhat reasonable collection of things like resistors, LEDs, and a breadboard seems like a good place to start if I'm going to actually make things.
  • Raspberry Pi for Dummies ($15.08): I posted about the Dummies book in the first couple posts. Again, it's probably worth it for me even though much of the material is stuff that I either already knew or could have figured out on my own. However, there are also things I didn't know, plus it will probably be a reasonable reference moving forward.
  • Getting started with Raspberry Pi ($11.35): This book is a bit more technical than I thought it would be, but it also seems to cover a broader range of programming ideas, which will probably help me out more after I've started to really wrap my mind around what's possible with the Pi (plus the Arduino).

I'll probably finish reading the book before I go to bed tonight. If not, I've got a wait at the airport and a plane ride on Wednesday. That should be more than enough time to get to the end.

Saturday, November 22, 2014

I'm some kind of dummy

I would be lying if I said that I read the whole book. But I've certainly finished skimming it. In a lot of ways, this book was probably too easy for me. But I do think I got some benefit from getting this book, and I'll almost certainly go back over a couple sections at some point. My intention here is to just summarize what I learned and any other thoughts I had as I was going through the text. This will be organized in the same way the book is.
  • Part 1: Getting Started with Raspberry Pi
    • I didn't need to read the section on installing an OS onto an SD card because the kit I bought (which I'll go into more detail on later) is already set up with one. However, I read it anyway because I felt it would be good for me. I envision myself picking up another SD card so that I have one that is stable and one where I'm not afraid to wreck things.
    • The section on connecting to the Pi suggested that I have an externally powered USB hub because the two USB hubs aren't enough. Apparently, this is quite a minefield. There's an entire webpage dedicated to these hubs. I'll have to look at this more closely when I get started and maybe make a run to Fry's and try to find one that works.
  • Part 2: Getting Started with Linux
    • The section on LXDE was a waste of time. If you don't know how to navigate a Windows-like environment, you probably won't be buying a Raspberry Pi.
    • I grew up playing with DOS, so I'm not afraid of the command line. That being said, I actually feel like I learned quite a bit from the section on the Linux shell. I probably would have eventually figured out everything in that section by brute force, ignorance, and the occasional internet search, but having the basic commands all in one place is much simpler.
  • Part 3: Using the Raspberry Pi for Work and Play
    • It's good to know Libre Office exists, but I really didn't need to learn how to use WYSIWIG text editor and a spreadsheet. I feel the same way about GIMP.
    • I don't know why this book contains a section on building a webpage. Does anyone buy a device like this to create webpages?
    • The section on Raspbmc was the only one in this part of the book that looked interesting. I might try setting this up just to do it. I don't have a lot of digital media, so this isn't going to be a long term media center for me, but I like the idea of being able to interact with the device using an XBox controller or XBMC remote app (whatever that is -- I just like the idea that you can use your phone to connect to the Pi somehow).
  • Part 4: Programming the Raspberry Pi
    • I've heard of Scratch before, but I've never really used it. It looks like it's a kind of toy programming language. There's even instructions for making a little space invaders game. I wasn't really that interested in it.
    • I've done a little bit of programming in Python. Mostly, it's been writing short code snippets to do some sort of calculation for me. The section on PyGame was brand new to me. I might try learning more about that, but that will most likely be unrelated to the Raspberry Pi.
  • Part 5: Exploring Electronics with Raspberry Pi
    • This is the section that has my interest. I want to know how to make this thing work in the real world. I skimmed through this because it was hard to make concrete connections with the topics without actually having played with the Pi. Part of the kit that I bought has some wires, LEDs, and other things to play with. There will be a lot of learning in this area, I think.
    • There are instructions for making a Labyrinth-like game where you tilt a box and try to make a ball hit some posts in a certain order. I might make this game for the experience of really understanding how this works. I have some thoughts about trying to make an interactive binary calculator that can be a educational display item. More on that later (maybe).
    • I might need to buy a few random tools to build things. For example, I don't have a soldering iron. And I don't think I have a good setup to do minor woodworking and building.
    • There are two other projects that are probably worth building for the experience. One is a Simon knockoff and the other is some sort of analog knob thing.

Something interesting I discovered only after I purchased this book is that a Second Edition of the Dummies book is coming out later this month. I probably should have looked into that before I made the purchase. Whoops. Too late now.

I'm still not going to break into the Pi just yet. I've got another book called "Getting Started with Raspberry Pi." This book looks get-it-up-and-running-ish. I should get through this in another day or two of reading. But it may turn into skimming, just as with the Dummies book. I kind of want to start playing around with the actual computer.

Friday, November 21, 2014

Getting Started

At this moment, I'm not even sure if I'm going to tell anyone about this blog. It's just something I'm doing to chronicle my adventures with a new piece of technology.

I spent about $100 to buy a Raspberry Pi with some extra components and a couple books. My long term goal is to combine some programming with some electronics and do something interesting. I don't know what that means. I'm just playing around with stuff to see where it takes me.

A little bit about my background:
  • I consider myself a hack programmer. I have no formal training in computer science, but I've toyed around with enough stuff that I can usually figure things out eventually.
  • I have a PhD in math. For the purposes of this project, this means very little. I didn't do anything in computer engineering (or engineering of any time) at any time in my academic career. My background may make it easier for me to pick up on some things, but that's probably about it.
  • I am a college professor at a teaching college. This potentially gives me access to resources that I might not otherwise have. However, my school doesn't have a computer science program or any type of computer engineering courses, so there are no faculty that specialize in anything where I can draw from their expertise. Besides, that would take away from the experience.
Even though it was probably unnecessary, one of the books I bought was Raspberry Pi for Dummies. This book is probably a little bit beneath my level, but I wanted to make sure I had a solid foundation from the beginning, so that I wouldn't accidentally end up doing things the hard way. I'm planning to read the book through before even turning on the Raspberry Pi. This will probably only take me a day or two. So until I get through that, nothing interesting is going to happen.