element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Microstack GPS and Accelerometer on RaspberryPi 2 and Ubuntu Mate
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 12 replies
  • Answers 1 answer
  • Subscribers 667 subscribers
  • Views 1376 views
  • Users 0 members are here
  • Ubuntu
  • 2
  • rasberrypi
  • raspberry_pi
  • mate
  • microstack
Related

Microstack GPS and Accelerometer on RaspberryPi 2 and Ubuntu Mate

doubletop
doubletop over 9 years ago

I'm going round in circles trying to get this to work with Ubuntu Mate and its not clear which posts on any website are relevant and which are not.

 

Here's where I've got to.

 

$ sudo apt-get install python3-microstacknode

 

Doesn't work

 

sudo apt-get install python3-pip

 

works

 

sudo pip-3.2 install microstackcommon microstacknode

 

works if pip-3.2 is changed to pip. However it puts all the files into /usr/local/lib rather than /usr/lib and there are no example files. microstackcommon and microstacknode files have been moved to /usr/lib/ in the existing file structure for python 2.7 python3,4 and python3,5. I got the examples from GitHUb and placed them in a local folder.

 

As there is no Rasp-config available config.txt has been edited to add

 

sudo nano /boot/config.txt

 

and

 

dtparam=i2c_arm=on

dtparam=spi=on

 

sudo i2cdetect -y 1

 

works. However, no device is found

 

0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:      -- -- -- -- -- -- -- -- -- -- -- -- --

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

70: -- -- -- -- -- -- -- --

 

Running the examples accelcat.py

 

Traceback (most recent call last):

  File "/home/pete/PythonTest/accelcat.py", line 11, in <module>

    with MMA8452Q() as accelerometer:

  File "/usr/lib/python3.4/dist-packages/microstacknode/hardware/accelerometer/mma8452q.py", line 126, in __enter__

    self.init()

  File "/usr/lib/python3.4/dist-packages/microstacknode/hardware/accelerometer/mma8452q.py", line 131, in init

    self.standby()

  File "/usr/lib/python3.4/dist-packages/microstacknode/hardware/accelerometer/mma8452q.py", line 153, in standby

    self.ctrl_reg1.set(self._ctrl_reg1_value)

  File "/usr/lib/python3.4/dist-packages/microstacknode/hardware/accelerometer/mma8452q.py", line 279, in set

    writing_bytes(self.device_address, self.register_address, v))

  File "/usr/lib/python3.4/dist-packages/microstackcommon/i2c.py", line 85, in transaction

    ioctl(self.fd, I2C_RDWR, ioctl_arg)

OSError: [Errno 5] Input/output error

 

and gpscat.py

 

Traceback (most recent call last):

  File "/home/pete/PythonTest/gpscat.py", line 3, in <module>

    import microstacknode.gps.l80gps

ImportError: No module named 'microstacknode.gps'

 

 

So clearly something is missing  from the pip install so rather than editing and juggling around files please where or how do I find the 'proper' install package that gets everything i need to make this work with Ubuntu Mate?

 

Pete

  • Sign in to reply
  • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube