A couple days back, I wrote about ‘The $3 Arduino‘, how to leave the Arduino board behind and program an ATmega168 Micro-Controller directly, still using the Arduino IDE but with the AVRMSPII programmer. Of course, the ATmega168 isn’t the only MC available for something like that. In fact, I have quite a few 8-bit AVR Micro-Controllers in a small box right here, next to my desk.
Let’s minimize the ‘Minimal Arduino’ even more, for instance by using the tiny ATtiny85 Microcontroller. Just like we did with the ‘BareBones’ definition, we add board definitions for the Mircocontrollers that the Arduino IDE doesn’t support out-of-the-box. Board definition for the missing MCs can be found here and after moving the
attiny folder into the
~/Document/Arduino/hardware folder and restartig the Arduino IDE, the IDE should now know about the new MCs. More details about this can be read here.
Extended List of supported Arduino Boards
Minimizing the Minimal Arduino
Now that the Arduino IDE knows about the really tiny ATtiny85, we can set it’s internal clock to 8Mhz and flash a small program.
Buying and using an official Arduino Board like the standard Arduino Uno is the perfect way to get started with the Arduino language, common electronic components, or your own embedded prototyping project. However, once you have mastered the initial challenges and have built some projects, the Arduino Board can get in the way.
For instance, many enthusiasts, who started out with hacking and extending the Arduino hardware and software, have now moved on to the Raspberry Pi, which is equally or even less expensive, but more powerful and complete. The Raspberry Pi comes with Ethernet, USB, HDMI, Analog-Audio-Out, a lot of memory, and much more; adding all these capabilities to the Arduino with Arduino-Shields, would probably cost several hundred Dollars. However, the Raspberry lacks some of Arduino’s I/O capabilities like Analog-Inputs.
Combining an Arduino with a Raspberry Pi, may make sense for a lot of project; but we don’t need or want to integrate an Arduino Board – the Arduino’s core, the ATMEGA Microcontroller, is all what’s needed.
[Last updated on Feb. 2. 2013 for (2012-12-16-wheezy-raspbian) Kernel Version 3.2.27+]
Three years ago, we bought two small Webcams and since we wanted to used them on Linux and OS X, we went with the UVC and Mac compatible Creative LIVE! CAM Video IM Ultra. This Webcam (Model VF0415) has a high-resolution sensor that lets you take 5.0-megapixel pictures and record videos at up to 1.3-megapixel, supported resolutions include 640×480, 1290×720, and 1280×960. If you like, you can go back and read what I was thinking about the IM Ultra back in 2009. Today, it’s not much used anymore, but may just be the right accessory for an Raspberry Pi.
With the USB Camera attached to the Raspi,
lsusb returns something like this:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
Bus 001 Device 005: ID 041e:4071 Creative Technology, Ltd
Using the current Raspbian “wheezy” distribution (Kernel 3.2.27+), one can find the following related packages, ready for deployment:
- luvcview, a camera viewer for UVC based webcams, which includes an mjpeg decoder and is able to save the video stream as an AVI file.
- uvccapture, which can capture an image (JPEG) from a USB webcam at a specified interval
While these might be great tools, mpeg-streamer looks like a more complete, one-stop-shop kind-of solution.
Overturned Basket with Raspberries and White Currants, 1882
By Eloise Harriet Stannard (1829 – 1915)
Eventually, you will start looking for an enclosure for the Raspberry Pi. Even during the early hardware development phase of your project, you can put the Raspberry Pi into an enclosure, given that the mainboard doesn’t have any on/off switches and that a Cobbler Breakout Kit provides easy access to the Raspi’s GPIO Pins (on a neighboring solderless breadboard).
Unlike for many other popular embedded development platforms, there are already many enclosures for the Raspberry Pi to chose from; many of which are listed over here at elinux.org.
We have bought two Adafruit Pi Boxes and two Raspberry Pi Cases from Barch Designs.
Using a serial connection to connect to a Raspbery Pi has many advantages. The boot process (Kernel boot messages go to the UART at 115,200 bit/s) can be monitored, without the need to hookup an HDMI-Monitor. Once booted, you can of course login through a serial terminal as well, i.e. the serial connection allows logging-in form a remote computer without running an SSH daemon on the Raspi.
UART TXD and RXD pins are easily accessible (GPIO 14 and 15), however, like for all GPIO pins, the voltage levels are 3.3 V and are not 5 V tolerant!
Since most of the desktop and laptop computers don’t come equipped with a serial port anymore, accessing the Raspberry Pi via a Serial Connection requires some requisites. I have recently connected to the Raspberry Pi using three different hardware setups ..
[Updated on Feb. 2. 2013 for (2012-12-16-wheezy-raspbian) Kernel Version 3.2.27+]
The extremely small EW-7811Un USB wireless adapter looks like the perfect WiFi adapter for the Raspberry Pi. Not only is it tiny and relatively inexpensive, it also seems capable enough to be a great companion device for the Raspi. While elinux still shows that some users report timeouts trying to initialize the module, I cannot verify this with 2012-12-16-wheezy-raspbian.
WiFi is not really necessary for the Raspberry Pi. It already comes with an ethernet port, provides RS-232 (aka serial-) connectivity, and has two USB ports. However, in case you wanted to add WiFi to the Raspi, this little adapter seems to be as good as any. Here is why:
The Edimax EW-7811Un
- complies with wireless IEEE802.11b/g/n standards
- adjust transmission output by distance and CPU offload, to reduce power consumption when wireless is idle
- is currently the smallest wireless adapter
- currently cost between US$ 9 and US$ 15
more than enough reasons to cut the cord and add WiFi connectivity to the Raspberry Pi.