-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to compile bma220.py #640
Comments
@nageshu, make sure you install after building the modules. The CMake install command for UPM installs python2/3 modules under ${CMAKE_INSTALL_PREFIX}/${PYTHON2/3_PACKAGES_PATH}/upm. The PYTHON2_PACKAGES_PATH can generally be site-packages or dist-packages depending on your distro. You can grep this install path from your build directory. For examples:
Would install to:
|
hey, because I am new at linux I am just unable to figure out the technical terms.please suggest the commands which can help me in this. thanks in advance! |
@nageshu, most likely you need to install upm once you've built the project. Try these steps (starting from the upm directory).
Then open python and import the bma220 module:
note - the above steps assume an install of mraa. |
Hey, But it is showing that value error the path it is showing is as follows: In this file on line 332 in__init__ . it is showing error: can you tell why it is showing this error? Thanks In Advance! |
@nageshu,
You can also look into some debugging with mraa.
Each python module has a python wrapper (pyupm_bma220.py) and shared library (_pyupm_bma220.so - translates python calls to the base library libupm-bma220.so). None of these files are meant to be edited. Here is a simple usage for the bma220 python module which reads the chip ID:
You can also reference the examples to see other intended usages: |
Hey, I have done following process:
please help me resolve this it will be really helpfull. |
Hey, |
@nageshu, I tested my up² with a bma220. For reference, here's some I2C basics. The mraa-i2c tool shows that the mraa index of '0' (mraa's default I2C bus) is the system I2C bus '5': $ mraa-i2c list
Bus 0: id=05 type=linux default
Bus 1: id=04 type=linux Doing a quick scan with mraa-i2c detect shows that there is a device on mraa I2C index '0' at 0x0a (the default I2C address of the bma220:
I also verified w/i2cdetect (from i2c-tools) to make sure the same addresses are returned (note, I2C system bus 5 == mraa I2C index 0) :
Using the UPM python module I'm able to read the bma220's chip id:
If the above detect commands are not showing a device at address 0x0a, then the UPM module is not going to be able to read the device. Here are some things to try:
|
@nageshu, any progress? |
Hey
unable to compile a program bma220.py
error showing no module named 'upm'
can you explain?
The text was updated successfully, but these errors were encountered: