117
Create your own face tracking, pan and tilt camera on the Raspberry Pi!
This tutorial will demonstrate use of the OpenCV (computer vision) library to identify and track faces on the raspberry pi using two servos and a USB webcam. For the interested, I previously covered a more thorough overview of the installation of OpenCV from source here, however, I have found that the apt package is sufficient for all...

122
Google Talk/Chat/Messenger is normally used by humans to interact with other humans. However, its underlying technology can also be used as a mechanism to implement software robots. Internet bots, also known as web robots, WWW robots or simply ‘bots’ can also utilize the technology to perform automated functions over the web. There are many such bots in existence, offering a diverse spectrum of...

157
This tutorial demonstrates how to easily use a Raspberry Pi to drive 12V RGB LED strips using Pulse Width Modulation (PWM). Out of the box, the Raspberry Pi has only one GPIO pin that is capable of pulse width modulation (PWM). However, thanks to the efforts of Richard Hirst and his servoblaster kernel module, standard GPIO pins can be used to perform PWM.
Note: The flashing of the LED strip due to PWM is...

161
Easily connect your Raspberry Pi to web services and social networks! This tutorial demonstrates how to painlessly send and receive Gmail on the Raspberry Pi from Python, which in turn, allows you to easily connect it to web services and social networks like Facebook, Twitter, and more! This would normally be well beyond the abilities of most users due to the inherent complexities of programming through social...

112
This tutorial will explain how to communicate from the Raspberry Pi to an MSP430 Launchpad board (M430G2553 chip) using SPI.
Requirements
1 Raspberry pi (running Raspbian)
1 MSP430 TI Launchpad
3 wires
Your raspberry pi should be running the newest version of Raspbian. To ensure your system is up-to-date please download and run rpi-update.
Wiring
MSP430
Flash the below code to your MSP430 chip....

I’ve recently taken a job at Ansible working on the enterprise offering Tower. In case you don’t know, Tower is a front-end for your Ansible playbooks w/ enterprise permission management. I was tasked with evaluating our database needs for a new System Tracking feature that we released. Working remotely at the time forced me to create detailed presentations on my progress and evaluation. I ended up taking the internal presentations and created a blog post about the evaluation process.

Share this:

So you want to get an instance of OpenStack running to poke around and see what all the fuss is about without going insane. Welcome to Devstack. Once Devstack is setup you will have access to a web-based control panel with prepopulated data and instances. You will also be able to explore the OpenStack API with v2.0 and v3 authentication (keystone).

Installing to the internal MMC requires an SDCARD to install, but the sdcard is not required after that. The process is mostly the same. The MMC setup vs. the SDCARD setup depends on which image you download.

Installing Ubuntu

MMC:Download the latest file of the form BBB-eMMC-flasher-ubuntu-xx.xx-xxxx-xx-xx.img.xzSDCARD:Download the latest file of the form ubuntu-12.10-console-armhf-xxxx-xx-xx.tar.xz

Extract the image

sudo apt-get install xz
xz -d *.img.xz

Insert the sdcard into your desktop and note the device path. In my case the device is at /dev/sdc.

Flash the image to the sdcard. Substitute <mmc_or_sdcard>.img and /dev/sdX accordingly.

sudo dd if=<mmc_or_sdcard>.img of=/dev/sdX bs=1M

Upon completion remove the sdcard and perform the following:

Ensure the beaglebone is off

If you plan on powering the beaglebone with usb, ensure the ethernet is unplugged.

Insert the sdcard into the beaglebone

Hold down the button that is by itself near the SDCARD

Insert the USB power or barrel jack power

Once the lights begin blinking blue you may release the button

Wait =~ 45 minutes until all the lights are blue

Once all the lights turn solid blue the MMC is successfully flashed and you may power down your beaglebone (unplug the power), remove the sdcard. Wait a couple seconds, then plug the power back in and the system will boot Ubuntu.

Share this:

This tutorial will show you how to use your Arduino as an oscilloscope. We end the tutorial with a verification portion that uses the Arduino to generate a square wave, requiring a single wire.

lxardoscope

Lxardoscope is another Arduino + real-time graphing project that has the potential to turn an Arduino into an oscilloscope. Unfortunately, I was unable to get any readings (the visual graph remained static).

Poor Man’s Oscilloscope

Desktop Application

Arduino uses a modified RXTXcomm.jar library. This causes a problem when the processing project runs poor man’s oscilloscope and loads the RXTXcomm.jar library bundles with the processing project. Instead, we wish for process to load the modified Arduino RXTXcomm.jar library. To remedy this problem we simply replace processing RXTXcomm.jar with the Android specific RXTXcomm.jar.

Share this:

This tutorial will demonstrate how to mount Dropbox (or any filesystem) over the network on the Raspberry Pi using SSHFS (Secure SHell FileSystem). For this procedure to work for your Dropbox share, you will need another machine somewhere that is running Dropbox, and is accessible to the Raspberry Pi via SSH.

Note: The following is not actually specific to the Raspberry Pi, nor to Dropbox. The tutorial generalizes for other systems and architectures that are not officially supported by Dropbox, as well as for mounting of other non Dropbox shares over the network.

How it works

SSH is a secure protocol for communicating between machines. SSHFS is a tool that uses SSH to enable mounting of a remote filesystem on a local machine; the network is (mostly) transparent to the user.

On the local computer where the SSHFS is mounted, the implementation makes use of the FUSE (Filesystem in Userspace) kernel module. The practical effect of this is that the end user can seamlessly interact with remote files being securely served over SSH just as if they were local files on his/her computer.

Next, the remote machine will need to be running OpenSSH server. For Windows and Mac instructions on how to set up OpenSSH server, I recommend this tutorial on Lifehacker. For Linux users, OpenSSH server is available in most every package manager. To install on Ubuntu, for example:

sudo apt-get install openssh-server

Installation (Raspberry Pi)

Now that the remote host is configured, you can setup the mount on the Pi. This first requires installation of the sshfs package. Open a terminal on the Pi and install it like this:

sudo apt-get install sshfs

Then add the user pi to the FUSE users group:

sudo gpasswd -a pi fuse

Once added to the fuse group, log out and log back in again for the change to take effect. Next, create a directory to mount Dropbox (or other remote share)

mkdir ~/Dropbox

Now use sshfs to mount the remote share on the newly created mountpoint. Be sure to change the user@remote-host and path to Dropbox to match your own settings:

sshfs -o idmap=user user@remote-host:/home/user/Dropbox ~/Dropbox

For example, connecting to another machine on your local network will look something like this:

The idmap=user option ensures that files owned by the remote user are owned by the local user. If you don’t use idmap=user, files in the mounted directory might appear to be owned by someone else, because your computer and the remote computer have different ideas about the numeric user ID associated with each user name. idmap=user will not translate UIDs for other users.

That’s all there is to it! To unmount,

fusermount -u ~/Dropbox

Automount Dropbox on boot

To configure the Dropbox SSHFS to automatically mount at startup, we first need to enable SSH keyless remote login. The first part of this task is to generate an RSA crypto key so we can securely login to the remote machine running Dropbox without entering a password. In a terminal on the Pi, run:

ssh-keygen -t rsa

Hit enter three times when prompted, accepting the default settings for the RSA ssh keys. Now copy the public part of the key to the remote host using the ssh-copy-id command:

ssh-copy-id -i ~/.ssh/id_rsa.pub user@remote-host

You will be prompted for the password on the remote one last time. Once entered, terminal output will confim the key was added sucessfully.

Now that you can login remotely without password, the final task is to configure the share to automatically mount on startup. There are a few ways this could be accomplished, I decided to use cron for the task. Open the global crontab for editing:

sudo crontab -e

And add a line to the end like this:

@reboot sshfs user@remote-host:/home/user/Dropbox /home/pi/Dropbox

Then press CTRL and X to exit the editor, then Y to confirm the changes (if using nano, the default text editior).

If your lucky then your device will have moved a bit and you might notice that the device didn’t reach its full range of motion. You will need to play with the SERVO_MIN and SERVO_MAX constants to achieve the devices full range of motion.

Debugging

This section contains hints and debug strategies if things didn’t just magically work for you.

Header File

The biggest trouble I had was getting the correct header file. An incorrect header file did not produce any warnings. The only feedback for a header file that didn’t match my board was the device moving less than 1 degree and behaving non-deterministic. Look at the documentation that came with your board to find the exact device. A list of device headers can be found in the directory /usr/msp430/include/.

Erase

The mspdebug program hosts a suite of commands. A list of commands can be gotten by typing help. The erase command is one that I found late into the night. Be sure to issue the erase command before you issue the load command.

Is it broke?

Often times when things aren’t working you will wonder if you broke the board because you touched some pin, got pissed off and threw it across the room, or your kitty cat Mr. Bigglesworth played kitty frisbee with it. Regardless of the reason you want some feedback that the board is still alive. I like to reload a piece of code that blinks the development board built-in lights LED blinking tutorial.

Recent Posts

#INCLUDE STD_DISCLAIMER

Always excercise caution when working with electronics. All software is provided on an "as is" basis without warranty of any kind, express or implied. Unless otherwise noted, all code content is licensed under the Apache 2.0 license