DASH! micropython test.py no module named 'OmegaExpansion'
-
root@Omega-C592:~# micropython test.py
Traceback (most recent call last):
File "test.py", line 1, in <module>
ImportError: no module named 'OmegaExpansion'but...
root@Omega-C592:~# python test.py
-0.795works 4.0.
I'm using the dash, so I want to use the lv_micropython lib to create the gui. I've had several issues so far and this is just one of them I've created a posting for. The other one is here:
https://community.onion.io/topic/4282/omega2-dash-adc-exp-python-not-connecting/3?_=1601154474163What do I have to do to get the microphython to recognize the OmegaExpansion package that is present?
I already also did this instruction: opkg install micropython-lib --nodepsThe code for test.py is below
from OmegaExpansion import AdcExp
class Test:
def init(self):
self.adc = AdcExp.AdcExp(address=0x48);
print(self.adc.read_voltage(0));Test();
-
@LightSwitch The ADC Expansion package is for Python only, it won't work for micropython.
To interact with the ADC Expansion with micropython, I recommend calling the
adc-exp
command-line tool from micropython.
See the OS function in micropython-lib: https://github.com/micropython/micropython-lib/tree/eae01bd4e4cd1b22d9ccfedbd6bf9d879f64d9bd/os