November 23, 2024, 12:10:25 AM

MOD-OLED-128x64 on LIME2

Started by BrendanSimon, August 31, 2015, 07:17:16 AM

Previous topic - Next topic

BrendanSimon

I've plugged in a MOD-OLED-128x64 (OLED) to a A20-OLinuXIno-LIME2-4GB (LIME2) via a A20-OLinuXino-LIME2-UEXT adapter.

I've installed the python pyMOD-OLED (https://github.com/SelfDestroyer/pyMOD-OLED) on the LIME2 but cannot get it to work.  I get the following error (see below for full error log)

  File "/usr/local/lib/python2.7/dist-packages/smbus_cffi-0.5.1-py2.7-linux-armv7l.egg/smbus/smbus.py", line 275, in write_i2c_block_data
    raise IOError(ffi.errno)
IOError: 70

As far as I can tell "IOError: 70" is a communications error from the FFI C library.

#define ECOMM       70  /* Communication error on send */

Does anyone know if the OLED should work on a LIME2 with the LIME2-UEXT adaptor?
The code is set to use i2c-0, which is located on GPIO-2 connector as far as I can tell (TWI-0).



$ sudo python2.7 Hello_World.py
[sudo] password for olimex:
Traceback (most recent call last):
  File "Hello_World.py", line 12, in <module>
    dis.initialize()
  File "/usr/local/lib/python2.7/dist-packages/mod_oled_128x64-0.0.3-py2.7.egg/oled/OLED.py", line 94, in initialize
    self.set_display_on_off(on=False)
  File "/usr/local/lib/python2.7/dist-packages/mod_oled_128x64-0.0.3-py2.7.egg/oled/OLED.py", line 284, in set_display_on_off
    self.__send_command([0xae | on])
  File "/usr/local/lib/python2.7/dist-packages/mod_oled_128x64-0.0.3-py2.7.egg/oled/OLED.py", line 159, in __send_command
    self.bus.write_i2c_block_data(self.__i2c_address, data[0], data[1:])
  File "/usr/local/lib/python2.7/dist-packages/smbus_cffi-0.5.1-py2.7-linux-armv7l.egg/smbus/util.py", line 59, in validator
    return fn(*args, **kwdefaults)
  File "/usr/local/lib/python2.7/dist-packages/smbus_cffi-0.5.1-py2.7-linux-armv7l.egg/smbus/smbus.py", line 275, in write_i2c_block_data
    raise IOError(ffi.errno)
IOError: 70