Sunday, November 29, 2015

Raspberry Pi and Arduino

I guess I've been in hibernation for a while. However, recently I stumbled upon Raspberry Pi and Arduino.

The Raspberry Pi is a single board computer that sells for under $35. The Raspberry Pi 2 Model B has a 900MHz quad core ARM CPU and 1 GB of RAM and can run a Debian Linux variant called Raspbian. Since the Debian linux distro already has all your web browsing and office productivity applications, you get a fully functional computer for $35 + monitor + keyboard and mouse:

The Arduino on the other hand is a micro-controller. What that means is, it is a complete computer - microprocessor, memory etc, on a single chip. However, that also means it's not all that powerful as a computer, and is usually used for a single task. Usually, the micro-controller does not run an operating system - since that would be a waste of the precious resource of memory. Rather it runs the single task directly as a program, so that it is essentially a one-program-computer. Normally that means, you will need complicated hardware to "flash" that program onto the micro-controller's "PROM" - Programmable Read Only Memory. However, in the Arduino's case, it has a "boot loader" - the OptiLoader. So in a sense, the Arduino can be considered a two-program-computer. The boot loader allows you to connect to the Arduino on the USB interface, and program the second program - your program - onto it's program memory. After that, until you change the program, the Arduino will keep running your program whenever and as long as it has power:

This past thanksgiving weekend, I ordered a Raspberry Pi unit on Amazon. I haven't received this yet, but I'm super pumped and have been researching Raspberry Pi quite a bit over the last few days. Also the Arduino - although I haven't ordered one yet. It should come before end of the week, and I will be posting new material on my journey with the Raspberry Pi and soon also the Arduino.

One cool thing is, since the Raspberry Pi is a full computer and can run Raspbian/Debian, it can run the Arduino IDE used to program the Arduino. So I can connect an Arduino to the Raspberry Pi via USB and work on it.

Also, I found these two cool videos about the Arduino. The former is an Arduino's essential circuit on just the ATMega328 chip: The latter is how to make your own Arduino: Notice how the latter video includes the USB for the Arduino, whereas since the former one-chip Arduino doesn't include a USB connecter, you have to program it by plugging it onto a standard Arduino board. I want to make a hybrid of these two, where I have a one-chip Arduino, but with a USB interface as well (may or may not be detachable).