I have recently ordered your Bar100 Sensors for field testing. I have a few concerns and queries id like to bring up.
Firstly, I am using an ESP32 S2 Feather to run the python code which you have provide for these sensors. I have tried to download step 1, the install smbus, however I am having the hardest time downloading this as it throws this error consistently (did pip, pip3, etc):
C:\Users\s_ada>pip3 install smbus
Collecting smbus
Using cached smbus-1.1.post2.tar.gz (104 kB)
Preparing metadata (setup.py) … done
Building wheels for collected packages: smbus
Building wheel for smbus (setup.py) … error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [5 lines of output]
running bdist_wheel
running build
running build_ext
error: [WinError 2] The system cannot find the file specified
building ‘i2c’ library
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for smbus
Running setup.py clean for smbus
Failed to build smbus
Installing collected packages: smbus
Running setup.py install for smbus … error
error: subprocess-exited-with-error
× Running setup.py install for smbus did not run successfully.
│ exit code: 1
╰─> [5 lines of output]
running install
running build
running build_ext
error: [WinError 2] The system cannot find the file specified
building ‘i2c’ library
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> smbus
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I then tried smbus2 as an install, now that installed, however even when trying to run the smbus or smbus on the circuitpython editor this is the error I keep getting, for smbus and smbus2:
Traceback (most recent call last):
File “code.py”, line 1, in
File “/lib/kellerLD.py”, line 2, in
ImportError: no module named ‘smbus2’
I have tried everything I can imagine to fix this but cant seem to get anywhere.
Query 2: How do I go about changing the i2c address of one sensor so that I can have 2 of these sensors, different addresses (one is 0x40 already), but on the same peripheral running together.
Thanks