Raspberry Pi can now work with UEXT modules


Image

In my previous post http://olimex.wordpress.com/2012/11/21/raspberry-pi-gpio-to-breadboard-and-uext-adapter/ I wrote about the Raspberry pi adapter we designed which allow Raspberry Pi to have access to the modules we have like Relay modules, Thermocouple sensor modules, 3-axis magnetometer and accelerometers, Zigbee, WiFi, GSM, GPS etc.

The RPI-UEXT adapter is already in stock and you can wire it to your Raspberry Pi with any 26-pin ribbon cable, we do offer 15 cm cable also which you can use with RPI-UEXT

On this video you can see how Raspberry PI is controlling MOD-IO 4 relays with the help of the RPI-UEXT adapter: http://www.youtube.com/watch?v=vuHU2SmLYBI

to make MOD-IO control as on above video with your RPi you should do as follows:

step 1:

sudo vi /etc/modprobe.d/raspi-blacklist.conf
The file should look like:

# blacklist spi and i2c by default (many users don’t need them)
blacklist spi-bcm2708
#blacklist i2c-bcm2708

step 2:

sudo vi /etc/modules

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with “#” are ignored.
# Parameters can be specified after the module name.

i2c-dev
snd-bcm2835

step 3:

sudo apt-get install python-smbus

step 4:

sudo vi modio.py

import smbus
import time
bus = smbus.SMBus(0)
address = 0×58

while 1:
bus.write_byte_data(address, 0×10, 0x0F)
time.sleep(1)
bus.write_byte_data(address, 0×10, 0×00)
time.sleep(1)

step 5:

sudo python modio.py

and you will see how the relays go ON and OFF :)

have fun!

Tagged , , , ,

8 thoughts on “Raspberry Pi can now work with UEXT modules

  1. ultimateohm says:

    Should four spaces be added before all lines in while loop? White space seems to be duifficult to be written properly in WordPress.

  2. [...] sensors, relays…) to the Raspberry Pi via low cost external UEXT modules. Olimex has just announced the RPI-UEXT adapter is now available for 3.95 [...]

  3. iulian says:

    hello, how can I go ON only one relay? best regards

  4. john says:

    how I read relays status? thank you

  5. imran says:

    the raspberry pi pack was promised, please provide the same

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 219 other followers

%d bloggers like this: