Raspberry Pi can now work with UEXT modules

Image

In my previous post https://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 = 0x58

while 1:
bus.write_byte_data(address, 0x10, 0x0F)
time.sleep(1)
bus.write_byte_data(address, 0x10, 0x00)
time.sleep(1)

step 5:

sudo python modio.py

and you will see how the relays go ON and OFF 🙂

have fun!