Need help communicating with a "primitive" I2C device
Art Milburn last edited by
Finally getting a chance to look at this again.
I want to thank everyone for their thoughtful responses.
I'm afraid I have a IoT noob question. How do I go about installing an .ipk file? I'd like to have a go with WereCatf's libsoc. Seems like the path of least resistance.
WereCatf last edited by
@Art-Milburn said in Need help communicating with a "primitive" I2C device:
How do I go about installing an .ipk file?
Download the file, then
opkg install package.ipk
Do note that I haven't tested these on the official firmware, so I don't 100% guarantee they work. But they should work just fine.
Art Milburn last edited by
Wow, I must be a total doof. I tried to use opkg to attempt to install python-libsoc_xxxxxxxxxx and I just got an error:
Installing python-libsoc (0.8.2-230117-1) to root...
- satisfy_dependencies_for: Cannot satisfy the following dependencies for python-libsoc:
pkg-config * libsoc *
- opkg_install_cmd: Cannot install package python-libsoc.
WereCatf last edited by WereCatf
@Art-Milburn Did you download and install libsoc? Also, install pkg-config from repos.
I can't figure out where to get pkg-config
oh found it:
I got it all installed but I get a segmentation fault when I try to import I2C
Matthew Butch last edited by
Ugh I was just trying to get this to work myself. What is annoying is there IS a write function that allows a no address write, but no corresponding read! Not sure why this was part of the kickstarter if its not easy to control, at least via python.
Casten Riepling last edited by
Has anyone found any reasonably straightforward solution here? I appreciate all the suggestions from folks, but am very surprised by the lack of corresponding function to the arduino Wire library for OMega2 + Python for I2C. I'm trying to get a board running that is working on Arduino utilizing the Wire API to get data from the device using Wire.requestFrom(), Wire.available(), and Wire.read(). Is the most straightforward solution to add parameter compatible calls to OmegaExpansion.onionI2c? I might be able to assist in any efforts if this seems like a path Onion would like to take that would be useful to others. Btw, I do love my Omega2. I think it just needs a little more library love!
Original Arduino Source: https://github.com/SparkysWidgets/MinipHBFW/blob/master/MinipH.ino
Python Version: https://github.com/SparkysWidgets/MinipHBFW/blob/master/RaspberryPi - Python3/pHReader.py
Andrei Kupreichik last edited by
Maybe posting here will make them merge the PR: https://github.com/OnionIoT/i2c-exp-driver/pull/15
Compiled packages are available on https://www.dropbox.com/sh/p7mki5nbgyu1tcv/AABPC1HzA848MbEA9RpNiNNva?dl=0
One can install them with opkg install libonioni2c_0.4-2_mipsel_24kc.ipk pyOnionI2C_0.4-2_mipsel_24kc.ipk pyOmegaExpansion_0.4-2_mipsel_24kc.ipk liboniondebug_0.4-2_mipsel_24kc.ipk
Example using modified python library: https://gist.github.com/foxel/a163231293d7cf6f24831b363a91dfe5