Saturday 1 November 2014

Using PiFM to transmit audio on any frequency up to 250 MHz

The first "hack" which allowed experimenters to use the Raspberry Pi's clock pin (GPIO 4) to transmit audio directly from the Raspberry Pi came from the Imperial College Robotics Society . Their "PiFM" module has since been modified and improved and is now capable of transmitting in 16 Bit Stereo on any frequency from about 1 MHz up to 250 MHz.

It sounds too good to be true.... so I decided to try it out for myself!

WARNING - DO NOT connect your Raspberry Pi's clock pin (GPIO 4) to any kind of antenna (even a short length of wire) when performing any of these tests!

Full details of the "PiFM"  module may be found here, and you can download it as a ".tar.gz" archive here. Once you have downloaded the archive to your Raspberry Pi, extract the files, open a terminal window on your Raspberry Pi and go to the folder containing the extracted files (in my case the Downloads folder). The folder should contain the flollowing six files:

left_right.wav           - sample stereo ".wav" file
sound.wav               - sample music ".wav" file (Star Wars theme)
pifm.c                       - pifm "c" source code
pifm                          - compiled pifm module
PiFm.pyc                 - Python bytecode for pifm
PiFm.py                   - Python script for pifm

Position a VHF portable radio close to your Raspberry Pi and tune it to a frequency where there is no transmission (in my case 100.0 MHz). Type the following at the command line prompt in the terminal window (but enter whatever frequency you want to use) and press Enter:

pi@raspberrypi ~/Downloads $ sudo ./pifm sound.wav 100.0_

Almost immediately you should hear the Star Wars theme playing on your portable radio. You can stop playback by pressing "Ctrl+C" or you can let the music play right to the end of the ".wav" file. However.....PLEASE NOTE that in either case your Raspberry Pi will continue to transmit a carrier on the frequency you have chosen until it is rebooted or turned off, so please DO NOT leave your Raspberry Pi transmitting a carrier after you have finished experimenting!

I decided to have a look at the spectrum of the transmitted RF signal, however my spectrum analyzer only covers up to 60MHz so I set the Raspberry Pi to generate a 30MHz signal. The spectrum is shown below:


You can see the "fundamental" signal at 30 MHz, but there are multiple strong subharmonic and harmonic spikes all over the RF spectrum. I also noted that if I tuned my receiver to any multiple of 30 MHz (e.g. 60MHz, 90MHz, 120MHz etc) I could clearly hear the transmitted signal, sometimes very strongly.

Therefore please DO NOT connect your Raspberry Pi's clock pin (GPIO 4) to any kind of antenna when performing any of these tests, because you will generate unwanted and potentially dangerous RF energy right across the electromagnetic spectrum.

Whilst it is very easy to use the Raspberry Pi's clock pin (GPIO 4) to generate an RF signal, and even transmit audio, the usefulness of this hack is severely limited by the huge amount of harmonic and subharmonic distortion in the signal (because it is basically a square wave). I've read many articles which suggest the Raspberry Pi may be a used as a low power transmitter for the amateur radio bands simply by using a low pass filter on the output, but I'd say even this is insufficient (due to the subharmonic distortion in the generated signal). To make any practical use of any RF signal generated by the Raspberry Pi in this way would require very good band pass filtering.

Wednesday 29 October 2014

Generating Radio Frequencies using the "Clock" pin GPIO 4

After many months of being busy with work, and more recently demonstrating the Raspberry Pi Wobbulator at radio rallies in Ireland and England, I have finally had the chance to return to doing what I enjoy most - experimenting with the Raspberry Pi.

It has been known for some time that (with some clever coding) the Raspberry Pi can generate an FM signal in the VHF broadcast band and transmit music (from a .wav file) or the signal from a microphone over considerable distances (10's or metres) using no more than a short length of wire connected to the "clock" pin (GPIO 4). Click here for full details.

More recently, I came across a modified version of the RPi.GPIO library which makes it very easy to generate radio frequencies using the Raspberry Pi's clock pin. Click here for details, where you will also find many other useful tutorials.

First of all, make sure your distro is up to date. For instructions on how to do this please click here.

To use the modified RPi.GPIO library you must first install the "python-dev" package, or the "python3-dev" package if (like me) you want to use Python 3. You can do this by using the "apt-get" command as follows:

pi@raspberrypi ~ $ sudo apt-get install python3-dev_

Once this package has installed, download the modified RPi.GPIO library using the "wget" command:

pi@raspberrypi ~ $ wget https://www.cl.cam.ac.uk/projects/
raspberrypi/tutorials/robot/resources/RPi.GPIO-0.3.1a.zip_

Extract the ".zip" file:

pi@raspberrypi ~ $ unzip RPi.GPIO-0.3.1a.zip_

Go to the "RPi.GPIO-0.3.1a" folder:

pi@raspberrypi ~ $ cd RPi.GPIO-0.3.1a_

And finally install the library using the following command:

pi@raspberrypi ~ $ sudo python3 setup.py install_

This will take a while, but after it has finished, launch IDLE3 and enter the following few lines of Python code:

import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(4,GPIO.ALT0)
GPIO.setclock(4,9500000)
GPIO.output(4,1)
time.sleep(10)
GPIO.output(4,0)

These few lines of code will cause the Raspberry Pi to generate a frequency of 9.5 MHz on pin GPIO 4 for ten seconds and then turn off. In order to run the code, you will need to save the file first - I called mine "RPi_RF_Gen.py".

I connected pin GPIO 4  to the input to an Oscilloscope so that I could have a look at the generated waveform, however I found that there was a DC component in the signal, so I connected pin GPIO 4 to the Oscilloscope via a small 10 pF capacitor. The waveform is shown below:


 "Clock" signals are square waves, but the observed waveform is slightly distorted, although some of this distortion may be down to the oscilloscope's sample rate. The Python code was run again, but this time the output from pin GPIO 4 was connected to a Spectrum Analyzer, producing the following results:


The primary signal is at 9.5 MHz, but there are numerous harmonics right across the RF spectrum (which is typical of a square waveform). For some reason, the highest RF frequency I could generate with the Raspberry Pi was 9.5 MHz, even though the documentation relating to the modified RPi.GPIO library I installed stated that it was possible to generate frequencies up to 19 MHz.

Therefore, using the modified RPi.GPIO library, it is possible to very easily generate RF frequencies using the Raspberry Pi clock pin GPIO 4, however the wave forms generated are square waves and as such contain multiple strong harmonics, and there appears to be an upper limit  in frequency of 9.5 MHz when using this method.

Monday 14 July 2014

Say "Hello" to the Raspberry Pi model B+

The Raspberry Pi Foundation have just announced the launch of the new Raspberry Pi model B+!



I was lucky enough to get my hands on one of the pre-production models and I've written a review of the new Raspberry Pi B+ on DESIGNSPARK

Tuesday 8 April 2014

Back to Basics with the Raspberry Pi Wobbulator

The Raspberry Pi Wobbulator has evolved and now has many new features including X and Y scales and a continuoius sweep option. The latest version 2.7.1 is now available on GitHub and has been uploaded to the Yahoo group. For those potential users new to Linux and the Raspberry Pi I thought that it might be time to recap (and update) some of the setup instructions for the Raspberry Pi.

So, imagine you have just received your Raspberry Pi.You may or may not have received a preformatted SD(HC) card with it. If you have received a preformatted SD(HC) card with your Raspberry Pi, it  probably contains the NOOBS OS loader software which gives you a choice of operating systems - please follow the instructions here to load Raspbian (Debian Wheezy).

If you have not received a preformatted SD(HC) card with your Raspberry Pi (or you have and you don't want to use it), you'll need a blank SD(HC) card of at least 4GB capacity, like the one shown below (available from Cut Price Cables):


The first thing you have to do is to download and install the latest version of Raspbian (Debian Wheezy). Go to www.raspberrypi.org/downloads and download the .zip file to your computer - it is quite a large download (about 780 MB) and there are various mirror sites where you can download it from.

Once you have downloaded and extracted the .zip file you should have a .img file with a size of 2900000 KB (2.80 GB). This is the bootable image that you will write to your SD(HC) memory card.

In order to write the bootable .img file to your SD(HC) memory card you need to download Win32DiskImager (I'm assuming here that, like me, you are a Windows user). Extract the .zip file in the directory (folder) you want to run it from. You can create a shortcut for Win32DiskImager on your Windows desktop by right clicking on the Win32DiskImager.exe file and selecting "Send To Desktop".

Take your SD(HC) memory card - if it is brand new it should be ready formatted, but if you have previously used it in (for example) a digital camera you will need to format it in your digital camera first. If your computer has an inbuilt card reader/writer, insert the SD(HC) card into the card reader/writer slot. If your computer does not have an inbuilt card reader/writer then you will need a USB memory card reader/writer like the one shown below (available from Cut Price Cables). Insert the SD(HC) card into the USB memory card reader/writer and then connect the USB memory card reader/writer to a USB port on your computer.


Double click on the Win32DiskImager shortcut on your Windows desktop and then click on "Run" if you get a Security Warning dialogue. The Win32DiskImager window should now be open.


Your SD(HC) card should show up under "Device" at the top right of the Win32DiskImager window - in the above screen shot the SD(HC) memory card is shown as D:\, but you may need to click on the drop down list to select the correct device.

*** A word of warning - I have a Toshiba laptop with an inbuilt card reader/writer, but Win32DiskImager refuses to recognise a memory card inserted into the inbuilt card reader/writer - I don't know why! However it works fine with a USB memory card reader/writer...***

Now all you have to do is click on the small folder icon to the left of the "Device" drop down list and navigate to and select the .img file you want to copy to the SD(HC) memory card. Then click on "Write" and "Yes" when asked to confirm overwrite.

Writing the bootable image file to the SD(HC) memory card will take a few minutes. Once complete you should get a "Write successful" message - click "OK" and then click "Exit" to close the Win32DiskImager application. If you are using a USB memory card reader/writer you need to click on "Safely Remove Hardware" and then remove the USB device before removing the SD(HC) memory card.

You should now have a bootable SD(HC) memory card for your Raspberry Pi.

Connect your USB keyboard and mouse to the two USB ports on the Raspberry Pi. Connect the Raspberry Pi to a suitable display (TV or computer monitor) using an HDMI (or HDMI to DVI) cable. Insert the prepared SD(HC) memory card into the card slot on the underside of the Raspberry Pi. Finally insert the micro USB power connector (making sure that the power adapter is switched on at the mains outlet).

If all goes well the red PWR (Power) LED on the Raspberry Pi board should light up and the ACT (Card Activity) LED should flash green. You will see many lines of text scrolling up on your display - this is normal. After a short time you will be presented with the Raspi-config screen:



Select the "Expand Filesystem" command and press Enter. This will expand the root partition on the SD(HC) card to use all the available space - if you don't execute this command the root partition will not use all the available space on the SD(HC) card. When you execute the "Expand Filesystem" command you will see some text scroll up your display and then you should see a dialogue confirming that the root partition has been resized:



Press Enter to close this dialogue and return to the Raspi-config "home" screen. I would recommend that you don't select any of the other commands at this time - although the Raspi-config screen only appears the first time the Raspberry Pi is booted, it can be run again at any time from the command line (you'll see how to do this shortly). Use the right arrow key to move the cursor down until "Finish" is highlighted in red and then press Enter. You will see a dialogue asking you if you want to reboot now.


Press Enter again to reboot the Raspberry Pi. Again you will see a lot of lines of text scroll up your display but eventually after the Raspberry Pi has rebooted you will see the following:

raspberrypi login: _

Type "pi" and press Enter. Now you will see the following:

Password: _

Type "raspberry" and press Enter (note that this time as you type the letters will not appear on the screen - this is to protect the security of your password). You should see some text scroll up your display and then you should see the following prompt:

pi@raspberrypi ~ $ _

This is the Linux command line prompt. From here you can enter commands directly - for example you can run the Raspi-config application simply by typing "sudo raspi-config" as follows and pressing 
Enter:

pi@raspberrypi ~ $ sudo raspi-config_

Use the arrow keys to move down to the "Enable Boot to Desktop/Scratch" option and press Enter.


You will see a "Choose boot option" dialogue. Choose the option "Desktop Log in as user 'pi' at the graphical desktop" and and press Enter.



You will see some text appear on the screen and then you will be returned to the raspi-config main window:



Use the right arrow key to move the cursor down until "Finish" is highlighted in red and press Enter. You will see a dialogue asking you if you want to reboot now. Press Enter again to reboot the Raspberry Pi.

When your Raspberry Pi reboots it should go straight to the LXDE GUI desktop. Using this configuration should make the system more "user friendly" because there is no need to log in or type "startx" each time, but the command line prompt is still easily accessible via LXTerminal if you need it. It also makes shutting down your Raspberry Pi simpler because now, when you click on "Logout" you get the following options:


If you click on "Shutdown" the LXDE GUI will close and your Raspberry Pi will safely shut down so that the power can be safely disconnected.

If you click on "Reboot" the LXDE GUI will close and the Raspberry Pi will restart and reload the GUI.

If you click on "Logout" you will have the option to log in as a different user.

You can of course revert to booting to the Linux command line by running the Raspberry Pi configuration utility again (in LXTerminal), selecting the "Enable Boot to Desktop/Scratch" option, and then choosing the "Console Text console, requiring login (default)" option.

To connect your Raspberry Pi to a network, simply insert a ethernet (CAT 5E) cable (available from Cut Price Cables) into the ethernet socket next to the two USB ports. Provided the other end of the cable is connected to a local area network (via a router for example) your Raspberry Pi should automatically connect  to the network, and the FDX (Full Duplex) LED, LNK (Link) LED and 100 (100MBit) LED should all light up (green, green and yellow respectively). You can check what the IP address of your Raspberry Pi is on the network by opening a LXTerminal window and typing "ip address show" at the command line prompt and pressing Enter. This will give you the following information:


The IP address is the sequence of numbers following "inet", so in my case it is "192.168.1.104". You'll need this information if you want to access your Raspberry Pi from another computer on your network. However please note that this IP address may not always be the same each time you connect your Raspberry Pi to a network.

Now that your Raspberry Pi is connected to the outside world, the first thing to do is to download the most recent updates for your Raspbian (Debian Wheezy) operating system. To do this type "sudo apt-get dist-upgrade" at the command line prompt and press Enter:

pi@raspberrypi ~ $ sudo apt-get dist-upgrade_

Your Raspberry Pi will now download and install the latest updates for your operating system. This may take a while. As it is progressing you will see a lot of text scrolling up your display screen.

The Raspbian (Debian Wheezy) operating system on your Raspberry Pi also gives you access to a huge library of (mostly free) software called the repository.  The "apt" part of the command you just entered stands for "Advanced Packaging Tool" and this is the management tool for the software repository. The operating system maintains a database file of all the software in the repository and you can download the latest version of this database by typing "sudo apt-get update" at the command line prompt and pressing Enter:

pi@raspberrypi ~ $ sudo apt-get update_

Your Raspberry Pi will now download and install the latest repository database files and will report it's progress by displaying various lines of text on your screen. When completed type "sudo apt-get upgrade" at the command line prompt and press Enter:

pi@raspberrypi ~ $ sudo apt-get upgrade_

This will instruct your Raspberry Pi to download and install the latest updates for all the software installed on your system. This may be a large download and may take a while. Once again as it is progressing you will see a lot of text scrolling up your display screen.

The Raspbian (Debian Wheezy) operating system and all the software installed on your Rasperry Pi should now be up to date. It is a good idea to run all three of the above commands regularly to ensure that your system has all the latest updates.

The Raspberry Pi Wobbulator software was all written in Python 3, which seems to be the programming language of choice as far as the Raspberry Pi community is concerned, perhaps because it comes ready to use with the Raspbian (Debian Wheezy) operating system. The software was written using IDLE 3 (the Python 3 Integrated Development Environment supplied with  the Raspbian (Debian Wheezy) operating system). To launch IDLE 3, double click on the IDLE 3 shortcut on the LXDE desktop. This will open the "Python Shell" window as shown below.


From here you can enter commands directly for immediate execution, or you can open a Python file to work on, or create a new file by clicking on the "File" menu and choosing the appropriate action.


However, please note that the Raspberry Pi Wobbulator software must be run with "root" privileges or as “sudo”. One way to do this is to launch IDLE3 with root privileges by typing "sudo idle3" at the command line prompt in a LXTerminal window and pressing Enter (but you have to do this every time you want to launch IDLE3 with "root" privileges).

pi@raspberrypi ~ $ sudo idle3_

A more convenient way to ensure that IDLE3 is always launched with "root" privileges is to edit the IDLE3 shortcut. Double click on "LXTerminal" to open a terminal window, and then type "leafpad Desktop/idle3.desktop" and press Enter


This will open the file "idle3.desktop" in Leafpad (a simple text editor). Go to the line "Exec=/usr/bin/idle3" and insert "sudo " in front of "/usr/bin/idle3" as shown below (I've highlighted the required change to make it stand out).



Click on "File->Save" to save the file, and then click on "File->Quit" to close Leafpad. Now every time you launch IDLE3 by double clicking on the IDLE3 icon on your LXDE desktop, you will have root privileges.

Now you're ready to build your Raspberry Pi Wobbulator by following Part 1 and Part 2 of the construction guide, and then follow the instructions in the Part 1, Part 2, and Part 3 of the setup and testing guide to get your Raspberry Pi Wobbulator up and running.

Raspberry Pi Wobbulator PCBs, full kits, and DDS modules are available from Cut Price Cables with free worldwide shipping, and for all the latest developments and discussion please visit the Raspberry Pi Wobbulator Yahoo User Group.

Thursday 9 January 2014

Setting up and Testing the Raspberry Pi Wobbulator - Part 3

With my Raspberry Pi Wobbulator powered up and ready for action the first task I decided to give it was to examine the frequency response characteristics of an RF crystal. If this sounds familiar, then it is because it is. I performed the same test using the revised Raspberry Pi prototype - see this previous post for details. I'm repeating the same test using the "production version" of the RPi Wobbulator to provide a direct comparison.

The first test was performed using Channel 1 - the linear input. The frequency sweep was performed with nothing connected to the input of Channel 1 (bottom blue trace), with the output from the DDS module fed directly into the input of Channel 1 (top blue line) and finally with the RF crystal connected between the output from the DDS and the input of Channel 1 (red plot).


The results obtained were virtually identical to those obtained when using the revised prototype.

The same test was then performed using Channel 2 - the logarithmic input.


Once again the results were very similar to those obtained using the revised prototype.

So, the "production version" of the Raspberry Pi Wobbulator seems to be performing very well! For details of further testing and details of other users experiences building and using the RPi Wobbulator please visit the Yahoo group.

If you would like to purchase a Raspberry Pi Wobbulator PCB or PCB and full component kit then please visit www.cutpricecables.co.uk/irpiwobbulator.html . The PCB is priced at £12.00, and the PCB plus kit of components is priced at £40. This includes all sales taxes and free worldwide delivery. You can purchase online and pay by credit or debit card, or PayPal.

Wednesday 8 January 2014

Setting up and Testing the Raspberry Pi Wobbulator - Part 2

Before downloading and running the RPi Wobbulator software, there are a couple of small adjustments that need to be made to the Raspberry Pi hardware, and the following adjustment procedure will also serve as a check that the hardware is working as it should.

I've written a small program called RPi Volt Meter to help you make the necessary adjustments. The source code for the program can be downloaded from Github, or you can  you can use the "git clone" command to download a copy of the program and associated files on to your Raspberry Pi. To do this, type the following at the command line prompt and press Enter:

pi@raspberrypi ~ $ git clone https://github.com/mi0iou/RPi_VoltMeter.git_

When you execute this command, a new folder called "RPi_VoltMeter" will be created under "/home/pi" and the source code (and other files) will be downloaded and saved in this folder. Launch IDLE 3 and open the file "rpi_voltmeter.py". Run the program by selecting "Run->RunModule" or by pressing "F5".




The RPi Volt Meter window should now appear:


This simple program allows the user to measure the voltage on any one of the four input channels on the ADC chip on the RPi Wobbulator PCB. Channels 1 and 2 are the two input channels for the RPi Wobbulator. Channels 3 and 4 are not used but are terminated with PCB pins so that you can measure any external voltage connected to the pins. The maximum voltage the ADC chip can measure is just over 2 Volts DC.

Leave Channel 1 selected and measure the voltage by clicking on the "Measure" button. Since at this point there is no signal being fed into Channel 1 this will measure the quiescent bias voltage. When I did this, I found that the voltage was about 2 Volts. This is far too high and is causing the input to the ADC chip is totally saturated. Turn the adjustment screw on VR1 screw anti-clockwise, taking a measurement of the voltage after each adjustment is made, until the bias voltage comes down to about 0.1 Volt.


Now select Channel 2 and measure the quiescent voltage. I found that it was about 0.6 Volts. If the measured voltage is not around 0.6 Volts, turn the adjustment screw on VR2 until you get a value of 0.6 Volts (or just under)


VR2 provides very fine adjustment of the quiescent voltage from about 0.3 Volts to just over 0.6 Volts. This corresponds to a variation in the "Slope" of the output from the AD8307 Log Amp of between about 11 mV/dB and 22 mV/dB respectively, so setting the quiescent voltage to about 0.6 Volts corresponds to Slope of  about 20 mV/dB.

Enough tinkering! If all has gone well you can now close the RPi Volt Meter window, and then close the source code file "rpi_voltmeter.py".

Now its time to download and run the Raspberry Pi Wobbulator software. Once again, the source code for the Raspberry Pi Wobbulator software can be downloaded from Github, or you can use the "git clone" command to download a copy of the repository on to your Raspberry Pi. To do this, type the following at the command line prompt and press Enter:

pi@raspberrypi ~ $ git clone https://github.com/mi0iou/RPi_Wobbulator.git_

When you execute this command, a new folder called "RPi_Wobbulator" will be created under "/home/pi" and the source code (and other files) will be downloaded and saved in this folder. If it isn't already running, launch IDLE 3 and open the file "rpi_wobbulator.py". Run the program by selecting "Run->RunModule" or by pressing "F5". The RPi Wobbulator window should appear:




The user can enter parameters for the frequency sweep along the bottom of the screen. The various buttons down the right hand side of the main window allow the user to select the input channel (Ch) on the ADC chip, the gain for the PGA (on the ADC chip), and the line colour used to plot the response curve. The user can choose whether or not to display a grid over the results area using the "Grid" check box, and the "Bias" check box activates the bias compensation feature of the software. The “CLS” button clears the results area of any previous plots and the “RUN” button initiates the frequency sweep.

The response curve of the circuit under test is plotted in the “results area” (the large cyan coloured area taking up most of the main window). The X-axis on the results area represents frequency from the “start frequency” on the left to the “stop frequency” on the right and the Y-axis represents the magnitude of the signal passing through the circuit under test, as measured by the ADC  chip.

So that's it! The Raspberry Pi Wobbulator is now ready for action...

In my next post I'll explain how to use the Raspberry Pi Wobbulator to examine the frequency response characteristics of an RF crystal, and this also serves as a good way to check that the hardware is working as it should.

Tuesday 7 January 2014

Setting up and Testing the Raspberry Pi Wobbulator - Part 1

Now you've built the Raspberry Pi Wobbulator kit it's time to check that it is working as it should!

The ADC chip on the RPi Wobbulator uses the I2C protocol to communicate with the Raspberry Pi, but I2C is not enabled by default on the Raspberry Pi,  so if you've not used an I2C device with your Raspberry Pi before then there are a few preparatory tasks you need to perform (this has been covered on a previous post, so if you've already done this you can skip this post and go straight to part 2).

Power up your Raspberry Pi, log in and then launch the LXDE desktop GUI. Open the file “/etc/modprobe.d/raspi-blacklist.conf” in Leafpad, go to the end of the file and "comment out" the last line by inserting a ‘#’ at the start of the line so that it looks like as shown below. Then save and close the file but please note that you will need root privileges to do so.


Open the file “/etc/modules” in Leafpad and add the line "i2c-dev" to the end of the file so that it looks like as shown below. Then save and close the file.


Now you need to install the “i2c-tools” package. Entering the following at the command prompt and press Enter:

pi@raspberrypi ~ $ sudo apt-get install i2c-tools_

Add your user name to the i2c group by entering the following at the command prompt (assuming your user name is “pi”) and pressing  Enter:

pi@raspberrypi ~ $ sudo adduser pi i2c_

Now it's time to power down your Raspberry Pi and connect the Raspberry Pi Wobbulator. The complete assembly should now look like the following photo.


Power up your Raspberry Pi, log in and then launch the LXDE desktop GUI. Open an LXTerminal window and type the following at the command line prompt and press  Enter:

pi@raspberrypi ~ $ i2cdetect -y 1_

This should detect the presence of the ADC chip on the RPi Wobulator and display the address of the i2c bus as shown below.



You now need to install the Quick2Wire library to allow easy access to the I2C port from Python 3, but first you need to download and install Setuptools.

Download the most up-to-date version of Setuptools (currently v1.1.6) from the Python website. Extract the “.tar.gz” package, go to the folder called “/setuptools-1.1.6” and enter the following at the command line prompt and press Enter:

.../setuptools-1.1.6 $ sudo python3 ez_setup.py_

Now download the Quick2Wire Python API package from GitHub. Extract the ".zip" file, go to the folder called “/quick2wire-python-api-master” and enter the following at the command line prompt and press Enter:

.../quick2wire-python-api-master $ sudo python3 setup.py install_

Now you should be ready to download and run the Raspberry Pi Wobbulator software. I'll explain how to do this and how to setup the hardware in my next post.