@Valeriy-Yatsenkov I'm used smbus2 library for Python. It's good work with Onion and in Python 2.7 and Python 3.x
https://pypi.org/project/smbus2/#description
For read and write without register address used read_byte and write_byte functions.
By the way I used PCF8574 with this library too.
Posts made by Sergiy Tarasov
-
RE: I2C: how to read a single byte without register address?
-
RE: I2C Detect Slave Method?
@UFD said in I2C Detect Slave Method?:
Hello everyone!How I can use these kmod's with another version of kernel?
Now I have latest firmware and the kernel version is 4.4.74. -
RE: OnionGpio for Python3
@Neil-Stelling,
Hi guys!
I have solved this problem.
See please for this repository https://github.com/OnionIoT/onion-gpio-sysfs/tree/master/python
You need the onionGpio.py file. But this file for Python2.x version. You must change all code line like "print xxxxxx" for "print(xxxxxx)". For example: "print 'GPIO%d path: %s'%(self.gpio, self.path)" change to "print ('GPIO%d path: %s'%(self.gpio, self.path))".
After that put this file to your project (or in Python PATH) and use it according to the instruction:
https://docs.onion.io/omega2-docs/gpio-python-module.html -
RE: I2C module for python3?
@zchef2k
I have the same problemm
I2C, GPIO and SPI. Doesn't work on Python3.
Did you solve it?