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.

10 comments:

  1. When I run i2cdetect -y 1
    The see the i2c address the output has NOTHING except double dashes.... no "68"

    Any ideas?

    This is a V1 Pi not V2.

    Dom
    M1KTA

    ReplyDelete
  2. Hi Dom,

    Try "i2cdetect -y 0" if you are using a Rev 1 Raspberry Pi

    Kind Regards,

    Tom

    ReplyDelete
    Replies
    1. root@m1ktapi1:~# i2cdetect -y 0
      Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory
      root@m1ktapi1:~#

      Same as normal user.

      72
      Dom

      Delete
    2. Was too early a Model B.... works now in a model A.

      72

      Dom
      M1KTA

      Delete
  3. Hello Tom,
    I bought a wobbulator kit from you @ the national hamfest. I have built the kit, but I'm having trouble
    getting it to work on my Pi, after downloading the latest rasbian I no longer have internet access on
    the Pi ? model B revision2 512MB, while trying to update files I am unable to get root priveleges !
    Is there a download available that has already been set up to use the wobbulator ? I'm afraid I'm not to familiar with the PI and its operating system. Best regards..............Peter (GW4ZUA)

    ReplyDelete
    Replies
    1. Hi Peter,
      If you send me a memory card, I'll install an image file on it that has everything already setup for the Wobbulator. Alternatively, you can buy a pre-prepared memory card from me.
      Kind Regards, Tom

      Delete
  4. Wobbly problems with the wobbulator

    ReplyDelete
  5. Dear Tom,
    cannot get software to run at all. Error messages 'no module named tinter' and 'WARN - kernel lacks Cgroups, memory controller not available'. The RP & Wobbulator is a professionally-assembled unit as my eyesight isn't good enough for the soldering! Any suggestions as this is very frustrating! Thanks.

    ReplyDelete
  6. sorry, the file is 'tinter' not 'tinter' of course!

    ReplyDelete
  7. Hello
    it is possible to adapt to a 5-inch screen

    ReplyDelete