Tag Archives: RBPi

Publishing Photos with the Raspberry Pi and Pygmyfoto

You have tons of photos, which you would like to share with your acquaintances, loved ones and so on. Well, there are several sites on the web that will allow you to do so, but doing it through your own server has a separate charm. Additionally, if that server can be put up with the new Raspberry Pi you just bought, then the project takes on a whole different hue altogether.

Although your Raspberry Pi (RBPi) is completely capable of doubling up as a web-server and sharing photos on the web, most of the popular photo publishing applications, such as Piwigo, Gallery, etc., are heavyweights meant for the PC. For publishing your photos online through RBPi, a lightweight entity such as Pygmyfoto is a better choice. Not only can you publish your photos in a continuous roll, Pygmyfoto allows you to add a brief description and assign tags to your photos. In addition, Pygmyfoto displays key EXIF data after automatically processing the photos.

Now the viewer has all information of the exposure, aperture and ISO you used when you clicked the photo. Not only this, Pygmyfoto also adds a link to the photo’s full size version, along with a map URL. Now, if your photo was geotagged, the URL will allow the viewer to use OpenStreetMap service to view the exact place where you had clicked the photo.

When you need simple photo sharing without the unnecessary extras, bells and whistles of more advanced blogging platforms, Pygmyfoto may be more suited to your needs. Since it is open-source, you can tweak it to meet the requirements of even the simplest of hardware. Pygmyphoto is meant to be simple, and if you find something you need is missing, well, you can program it in.

So, how do you install Pygmyfoto on an RBPi? First, you need some required packages to be installed. For this, set up your RBPi to run the following command:

sudo apt-get install apache2 php5 sqlite3 php5-sqlite imagemagick libimage-exiftool-perl git

Now you must switch to the directory /var/www and clone the repository of the Pygmyfoto GitHub:

sudo git clone https://github.com/dmpop/pygmyfoto.git

Now change the directory’s owner and group with:

sudo chown www-data:www-data -R pygmyfoto

Switch to the Pygmyphoto directory and use a text editor to open phpliteadmin.config.php. Replace the default password by editing the line –

$password = “admin”

Modify the default values in the file config.php, if necessary.

Now you can add photos to the directory pygmyphoto/photos. Run the ./pygmyphoto.sh command in a terminal, and provide the required into.

The viewer must point their browser to http://127.0.0.1/pygmyphoto to view your photos. Of course, they must replace the 127.0.0.1 with the IP address or the domain name of your server.

For accessing and managing your database at pygmyphoto.sqlite, you must make it writable. Use the command:

sudo chmod 600 pygmyphoto.sqlite

Now, you can point your browser to http://127.0.0.1/pygmyfoto/phpliteadmin.php and log in. you must use the password you specified in the file phpliteadmin.config.php earlier. Do not forget to replace the 127.0.0.1 with the IP address or the domain name of your server.

All about Fritzing

Fritzing is a software program to help designers translate their prototypes into real products. Created at the University of Applied Sciences, Potsdam, the software is an open source software tool. It runs on Linux, Mac OS X and MS Windows.

The Open Source Idea

The term open source in software development indicates an approach that provides any individual access to the design of a product or improvements made to it. The Internet has made the concept of open source more viable.
In an open source program, any individual may open or unlock the source code. An innovative programmer may even make modifications to the code in an attempt to improve upon it.

Concepts behind Fritzing

To understand Fritzing, it is important to know something about Breadboard View, Schematics View, and Printed Circuit Boards View.

Breadboard View – Fritzing can present your circuit in breadboard view, making it easy to visualize how components will fit together and be wired together. Fritzing has a vast library of parts to represent all major components in the Breadboard view.

Schematic View – This is the traditional view of the circuit as represented in books. Frtizing has a large library of schematic parts to build up the Schematic View.

Printed Circuit Board View – A printed circuit board (PCB) consists of electronic components connected electrically on copper tracks laminated on a non-conducting substrate. This view is necessary to fabricate the PCB for the circuit.

Purpose of Fritzing

The software program allows designers and other professionals to record their prototypes created for various circuits and design corresponding PCBs. You can use the company website to communicate your ideas and drafts with other individuals. Others may create electronic items based on your prototypes. This concept of sharing helps reduce production costs.

One of the great advantages of Fritzing is amateur electronics enthusiasts can design circuits and build PCBs suited to their needs. All the gear needed is available from the Fritzing store.

You can even play with the Raspberry Pi using Fritzing. The rapidly growing Fritzing library now features the Raspberry Pi Model B!

Making your own PCB

You can design and create a printed circuit board using the Fritzing software.
Print your circuit diagram onto a sheet of glossy photographic paper using a laser printer. Place the sheet on a copper board with the printed side facing the board. Run a hot clothes iron over the sheet. If you have done the job well, you should get a clear etching of the circuit on the board. You may need to clear away the excess copper with a Ferric Chloride solution.

Be careful with the Ferric Chloride solution as this is a very corrosive liquid and will eat through most clothing and skin. Wearing a PVC apron, gloves and PVC shoes is recommended when working with Ferric Chloride.

The Fritzing software company provides a service called the Fritzing Fab. You will have to upload your file, place your order and make the payment. At the time of placing your order, you can request extra services like punching holes for mounting the board. The company will deliver your printed circuit board in about two weeks.

4 Accessories to Turn your Raspberry Pi into a Workhorse!

Gert Board To Pair Up Your Raspberry Pi With The ATmega Microcontroller

You can now expand the General Purpose Input Output (GPIO) pins of your Raspberry Pi with a Gert Board. Gert Board is the brainchild of Gert Van Loo, one of the developers of the alpha version of the Raspberry Pi. With the addition of the 28-pin ATmega microcontroller, you have the entire Arduino Integrated Development Environment (IDE) at your disposal. Moreover, it is possible to add any of the following ATmega controller models to the Raspberry Pi – ATmega 48A/PA, ATmega 88A/PA, ATmega 168A/PA or the ATmega 328A/PA.

So, what does this mean for your Raspberry Pi? By adding the Gert Board, you get an 18V @ 2A port for your motor projects. You also get a 2-channel, 8-, 10- or 12-bit Digital to Analog converter along with a 2-channel 10-bit Analog to Digital converter. Additionally, you get 6-Open Collector drivers capable of 50V @ 0.5A, 12-Buffered I/O’s and three push buttons.

PiFace Digital Controller

If you intend to control external hardware via the Raspberry Pi’s GPIO header, the easiest way is to use the PiFace Digital developed by Andrew Robinson of the University of Manchester. The PiFace Digital has two onboard changeover relays, and this is the central feature of the add-on board. The changeover relays have open-and-close positions, which are accessible to the user. Each open-and-close position of the relay can handle 5V @ 10A maximum. You can program the board through Python, C or Scratch. Scratch has also developed an emulator, called the PiFace Emulator. This gives you a graphical control over the features of PiFace. Not only this, PiFace has additional onboard features such as eight digital inputs., eight open-collector outputs on connectors, eight LED indicator lights on the outputs and four tactile switches.

Pi Camera

The Raspberry Pi has an onboard CSI port, which you can connect using a ribbon cable to the Camera Module. The Raspberry Pi camera module measures only 25mm x 20mm x 9mm. The tiny module has an Omnivision 5647 fixed-focus module that can handle 5MP still images, while weighing only 3 gm. You must use a 4GB or larger SD Card on your Raspberry Pi, as this is where the images from the camera are stored. The camera can handle resolutions of 1080p30 (1080 pixels at 30 frames per second), 720p60, and 480p60/90. The CSI bus on the Raspberry Pi is capable of handling high data rates streamed directly to the processor on board (BCM2835 ARM 11).

A Slice of Pi

This breakout board, called the Slice of Pi, is the least expensive of all the expansion boards for the Raspberry Pi. The board has a serial peripheral IO port expander, MCP23017, which adds 16-input/output channels to your Raspberry Pi. Apart from this unique feature, you can also use the board as a custom development area. One key feature of this Slice of Pi is the Xbee style connector mounts. Since this can support the XRF, Xbee and the RN-XV wireless modules, the functionality definitely expands the popularity of the board. Apart from this, you have easy access to the on-board GPIO, the 3V3, 5V; GND and the TX/RX solder points.

Do Even More with your Raspberry Pi

When you own a Raspberry Pi, there is so much you can do with it. However, combine the bare Raspberry Pi with some attachments, and you have a gadget that could far exceed your expectations. Presented here are some of the more useful attachments, which will increase your expectations from the Raspberry Pi.

LCD Option from 4D

When you want to exploit the full HD capabilities of the Raspberry Pi, give it the color LCD options from 4D Systems. The company’s EVE (Extensible Virtual Engine) that is featured by the “Picasso Processor” drives the 480×272 pixels on the TFT Screen of the 4.3-inch “uLCD-43-PT-Pi”. This gives you 65,000 true to live colors on a 4.3-inch diagonal screen. The 4.3-inch screen is notable for its resistive touch layer, which can sense both finger as well as stylus interaction.

When you are going portable with your Raspberry Pi, this screen will be absolutely essential. To connect with the Raspberry Pi, this series of LCD screens from 4D has a “4D Serial Pi Adapter” that connects to the GPIO port of the Raspberry Pi board, through a 5-way cable adapter. The best feature of this adapter is it does not hog all the GPIO port, but allows for duplication of the GPIO lines, so that you can stack another board on top.

AlaMode

A team of like-minded students and engineers has made the AlaMode board that has some special features. Working off the Raspberry Pi GPIO port, AlaMode is a stackable board compatible with Arduino. The goal of the Wyolem Team was to provide the Raspberry Pi and its user’s access to the vast library, devices and “Shield” expansion boards available for the Arduino and its community. This allows you the complete freedom to program the Raspberry Pi in any language you prefer and control the Arduino or the AlaMode directly.

The AlaMode takes its power directly from the Raspberry Pi, or you can power it separately from USB, wall-mart or external batteries. For application memory support or for data logging, a micro-SD card slot is added. You also have a real-time clock (DS3234), which reports its time back to the Raspberry Pi, thus removing the necessity to program two clocks.

You can even connect a Fastrax UP501 GPS receiver module on the AlaMode. This opens up the Raspberry Pi to the expanding stackable shields of the Arduino.

LCD & Keypad Kit

Some Frequently Asked Questions about Raspberry Pi

Q. What is a Raspberry Pi?

A. The Raspberry Pi is a low cost, tiny computer, about the size of a credit card. You can plug your keyboard, mouse and your TV into it, and use it just as you would use a PC. It is capable of playing games, word-processing and working with spreadsheets. You can even watch high-definition video. The composite and HDMI out allows you to connect to any old analog TV, a digital TV or to a DVI Monitor. It is a wonderful device for kids to learn programming.

Q. What are the different models of Raspberry Pi available?

A. As of today (August, 2013) there are two: Model A and model B. Model A has 256MB RAM and one USB port. Model B has 512MB RAM, 2 USB ports and one Ethernet port. When you buy the Raspberry Pi, you get only the board. No SD card or power supply is included, but you can buy them separately. Pre-loaded SD cards are also available.

Q. What are the physical dimensions of the Raspberry Pi?

A. The Raspberry Pi dimensions are 85.6x56x21 (mm) or 3.37×2.21×0.827 (in.), with a small overlap as the connectors and the SD Card project over the edges. The Raspberry Pi weighs about 45 gm.

Q. What is the SoC used for the Raspberry Pi?

A. The SoC or System on Chip is a Broadcom BCM2835. This contains an ARM1176JZFS processor running at 700 MHz, with floating point and a Videocore 4 GPU. The GPU is capable of Blu-ray quality playback and uses H.264 at 40MBits/s. The fast 3D core is accessed using the supplied OpenVG and OpenGL ES2.0 libraries.

Q. How powerful is the Raspberry Pi?

A. The GPU or the Graphical Processing Unit operates with OpenGL ES2.0 and the hardware-accelerated OpenVG libraries, providing 1080p30 H.264 high-profile decode.
The GPU can provide 1Gpixel/s, 1.5Gtexel/s or 24GFLOPS of general-purpose compute along with several texture filtering and DMA infrastructure.
In real world terms, the performance is similar to a 300MHz Pentium 2; however, Raspberry Pi provides much swankier graphics. Overall, the graphical capabilities can be equated to an Xbox 1 level of performance.

Q. Will the Raspberry Pi blend?

A. Yes, extensive virtual simulations have been carried out, there were no failures.

Q. Is it possible to overclock the Raspberry Pi?

A. Most of the devices run comfortably at 800MHz. The latest operating system has options of changing the options for overclocking on the first boot. If you run “raspi-config” you can change the options again at any time, and your warranty stays intact. However, these settings are experimental and not every board can be expected to run stably at the highest setting. To restore stability, try reducing the settings for overclocking.

Q. How do you boot the Raspberry Pi?

A. You need a pre-loaded SD card to boot. After the initial boot, a USB HD can “take over”. The root partition on the SD card must contain the operating system. Currently Debian Linux is the default distribution, but you can use any other ARM Linux distro available on the downloads pages.

Q. What are the power requirements of the Raspberry Pi?

A. The device is powered by 5V from the micro USB. To switch on, simply plug in the USB, to switch off, remove the power.

Let Raspberry Pi Make It to the Movies through XBMC

The Raspberry Pi is capable of HD video. Won’t it be great if you could playback your Blu-ray movie collection through Raspberry Pi on to your HD TV or monitor? That would be possible if you knew how to let Raspberry Pi run XBMC.

What is XBMC?

XBMC is a software media player and entertainment hub, and the best part is you do not need to pay anything to get it, as XBMC is free and open source (GPL). As a media player, XBMC has almost everything you will need, right from TV and remote controls, to support for digital media files from local and network storage media including the internet. You can play and view most digital media files such as podcasts, music and videos.

There is not much that XBMC misses. You get to play all your music files in mp3, flac, wav and wma formats. You can watch movies in all the main video formats including streamable online media. You can keep track of your progress of season views and episodes of TV shows. You can import pictures into a library for browsing as in a slideshow, and you can record live TV all from the nice GUI interface that XBMC has.

Step 1: Download XBMC

You will need to download an image of XBMC, which is available as “debian-xbmc-24-04-2012.zip” and you can get it here. Unzip the file to get to the image.

Step 2: Write the Image on to an SD Card

If you are on Linux or OSX, open up a terminal and navigate to the folder containing the downloaded image. To write to an SD card, you have to enter the following command –

dd bs=1m if=debian-xbmc-24-04-2012.img of=/dev/rdisk1

Note that ‘/dev/rdisk1’ depends on the type of PC you are using.

If you are still on Windows, you need the Win32DiskImager utility program to write the image to the SD card in the device box.

Step 3: Make Space on the SD Card

The image written to the SD Card will be about 2GB, leaving about 60MB free space. This is not enough for XBMC to operate properly. Use Gparted, which is the Debian partition editor to expand the free space. Assuming you have a 16GB card on which you installed the OS and XBMC, there is still 13GB space left over. Go into Gparted, and expand the Linux swap partition to cover the 13GB. That will allow XBMC to use the free space.

Step 4: Start Action

Plug in the SD card into your Raspberry Pi, and boot it up. At the command prompt, type –

XBMC

and you should be able to see the following –

Note that XBMC is still an alpha release, and is somewhat fragile. It might lock up or not start at all. This is expected and you may need to restart Raspberry Pi over again to get XBMC play properly.

Try out all your music, video and other programs including your favorite TV shows, and you will be surprised at the quality of the output from the combination of XBMC and Raspberry Pi.

Raspberry Pi projects to inspire you!

In How Many Ways Can You Use Your Raspberry Pi?

Many of you who already have the tiny Linux PC – the RaspBerry Pi – affectionately also known as RBPi, are already using it in your own way to write and test code and to build controllers. The Raspberry Pi is a stripped-down Linux computer, running an ARM-Based CPU, with a graphics processor and many pins and ports, which you can use. We present here many extraordinary ways that owners have Raspberry Pi developed new projects.

Well, taken straight out of its packing, you can plug your TV into Raspberry Pi, connect a keyboard and try some of casual games, video streaming and word processing. All this must have become pretty mundane for Simon Cox after sometime, since he decided to build a supercomputer out of many Raspberry Pis. The computer engineer from UK’s University of Southampton tied 64 Raspberry Pis together. His 6-year old son built the rack for the supercomputer with his LEGO set!

Have you ever thought of mixing music, vegetables, wordplay and Raspberry Pi? Not likely, but Scott Garner has. On his BeetBox, you can play drumbeats on real beets when you touch them. He has used capacitive touch sensors for communicating between the beets and his Raspberry Pi. His only complaint is that the beets dry off and have to be replaced.

If Raspberry Pi is a Linux computer, surely it can be used as a palmtop. A similar thought must have prompted Nathan Morgan to build his Pi-to-Go Palmtop. Sporting a 640×480 display, a touchpad, support for HDMI, Bluetooth, Wi-Fi and a 64-GB solid state drive, it is a perfectly portable Raspberry Pi. However, some of you may not find it to be the thinnest or the lightest, but it is enough as a proof of concept to its maker.

Beer and Raspberry Pi may not be an obvious match, but that did not deter a company Robofun Create in making a QWERTY keyboard from 44 beer cans from a Prague-based brewery. If you are over 21, you are allowed in the bar and you can tap the tops of the beer cans to let Raspberry Pi produce the corresponding alphabets on a plasma screen overhead. Of course, the alphabets are also marked on the tops of the beer cans.

Movies such as “The Life of Pi” can also be inspiring. FishPi is planning to set Raspberry Pi adrift in a boat that will be crossing the mighty Atlantic. Raspberry Pi will not be floating idly, but has to control the boat’s navigational system. In short, Raspberry Pi will be the captain, navigator and sailor for the 20-inch long boat. Additionally, it has to collect scientific measurements for which it will be powered by a 130-watt solar panel. We wish Raspberry Pi all success on its solo sailing trip.

Like most people who buy nice things on impulse, such as an Raspberry Pi, are stuck for want of a suitable project. Jeroen Domburg had the same problem, until he came up with the Teeny Tiny Arcade. His is probably the smallest gaming cabinet built in an arcade style. Jeroen cut the plastic with laser to make his cabinet and it has a 2.4-inch TFT Display.

Let Your Raspberry Pi Take Pictures of the Earth

How About Letting Your Raspberry Pi Take Pictures of the Earth?

Many many years ago, before cameras came to be associated with lenses, people captured images on film using a pinhole on the camera. This technique is still in use today. It’s called heliography and it requires long to very long exposure times – sometimes as much as 24 hours to six months. The results are rather stunning, as you can see.

Unless you have photography as a hobby, you may not be able to spare much time and may not have equipment suitable for heliography. However, taking pictures of the earth is quite an exciting project, and since you have Raspberry Pi, why not let the tiny Linux computer do it?

That is exactly what Dave Akeman planned to do. He created the Raspberry Eye-in-the-Sky project that sent Raspberry Pi and a bunch of components out into the atmosphere where the weather balloons go and burst themselves. The payload consisted of a Raspberry Pi, a camera and a tracker, powered by a few AA batteries. The pictures, taken while the camera was in the sky, are spectacular and amazingly crisp.

Dave changed the regulator on the Raspberry Pi and modified it so the computer could work on 3V instead of 5V, to allow the batteries to last longer. He embedded the entire electronics in a foam replica of the Raspberry Pi logo, with the camera peeping out from the bottom. The foam was for softening the landing of the package when it hit the ground after the balloon burst. Dave also put in a parachute so the package would come down smoothly.

Dave had to take permission from the CAA for the Hydrogen balloon that would carry his Raspberry Pi camera payload into the atmosphere. He used the latest Pi camera software and changed the code to make it take three types of images each at about one minute interval. One small image is taken for the first radio channel, one medium image for the second radio channel and one hi-resolution image is stored on the SD Card onboard. Additionally, Dave configured the camera to work in matrix-metering mode instead of spot metering, as this gave better resolution images.

The balloon and its camera payload went up one sunny morning, near Tetbury, UK. People from France, Holland and Northern Ireland monitored the Raspberry Eye-in-the-Sky broadcast. The image quality throughout the 3-hour flight time was excellent. The flight path, with the wind guiding it, had quite a few changes of direction and some loops. The package went up to about 24.5 miles in height finally landed near the city of Swindon about 22 miles away from Tetbury.

As the launch was delayed by more than 2 hours, the Raspberry Pi package missed the original predicted landing spot, since the wind pattern had changed in the meantime. In addition, a resident of Swindon found the package as it landed near him, and took it home. He then called up Dave after finding his telephone number on the package. That solved the initial mystery as to how the Raspberry Pi package travelled to another location after it had landed.

How to measure temperature with a Raspberry Pi

Looking for another project to make with a Raspberry Pi? You can use your Raspberry Pi to measure temperature. Not only at a single point, but also at maximum of 20 points simultaneously. Of course, you will need 20 individual sensors for doing that. Raspberry Pi will poll all the 20 sensors one after the other, and read the temperature from each of the sensors.

If you are wondering how complicated it would be to wire up 20 sensors to the Raspberry Pi, you can relax, since you need only three wires in all. One of the wires will carry power to the sensors, one wire will be the ground or return path and the third wire is a unique 1-wire interface to control the sensor and to read the temperature measured by it.

This wonder sensor is a High-Precision 1-Wire Digital Thermometer, DS18S20, with a measurement range of -55°C to +125°C (-67°F to +257°F), a thermometer resolution of 9-bits and an accuracy of ±0.5°C from -10°C to +85°C. Maxim Integrated makes this thermometer and the smallest size is a little larger than a matchstick head (TO-92).

Not only can this tiny fellow read the temperature, it stores them in its non-volatile memory and can present them either as °C or as °F. You can set temperature limits in its memory and DS18S20 will tell you when the temperature it is monitoring goes beyond the programmed limits. You can use this thermometer with the Raspberry Pi to control thermostats, industrial systems, consumer products or any thermally sensitive system.

At this point, you may be wondering if there is only one single wire for all the 20 sensors, how is the Raspberry Pi able to differentiate the twenty temperature readings. Maxim has programmed each of the sensors with a unique serial number, and when Raspberry Pi wants to read the temperature from a specific sensor, it simply asks for it by the serial number of that sensor. Only the sensor whose serial number the Raspberry Pi queries, sends the temperature data, all the others remain silent.

The Raspbian Linux distribution that you are using in your Raspberry PI already has all necessary kernel modules installed for accessing the 1-wire bus. The programming details are rather simple and you can refer to them here.

What else can you do with a DS18S20 and Raspberry Pi? You may be measuring temperature at a remote place, or there is no space for the extra power supply to the DS18S20. So, instead of supplying power separately, you could make DS18S20 “steal” power from the 1-Wire bus. For this, you must connect the VDD pin of the DS18S20 to ground. According to the datasheet, do not use the parasitic mode for measurements above 100°C, as the DS18S20 will not be able to sustain communications.

If you have programmed temperature limits for some of the DS18S20s, they will raise a flag if the temperature they are sensing goes beyond the set points. By polling for the flags, Raspberry Pi can know, which sensor is sensing temperatures beyond its set point.