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 & Tria 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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 Xtrinsic sense - python code not working for me
  • 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
  • Replies 2 replies
  • Subscribers 673 subscribers
  • Views 366 views
  • Users 0 members are here
Related

Xtrinsic sense - python code not working for me

Former Member
Former Member over 9 years ago

Hello everybody,

 

I have a rasberry pi 2 with a xtrinsic sense board connected and running raspbian 4.4.13.

After i downloaded the sorce files from here "hhttp://git.oschina.net/embest/rpi_sensor_board" i try to run sudo python mpl3115a2.py   but no result .

I tryed to debug and i saw that the program get stuck on MPL3115A2_Init_Alt() and i'm not reciveng any error message.

 

Did anyoane else had this issue ?

 

I also tryed with the c code but after i compiled the mpl3115a2.c file i have this message(the hidef.h file is in project directory) :

 

In file included from mpl3115a2.c:15:0:

system.h:17:67: fatal error: hidef.h: No such file or directory

#include <hidef.h>                /* for EnableInterrupts macro */

 

PS: On Windows IOT the board works fine but i need it in raspbian

 

I wait for the suggestions .

Thanks.

 

Message was edited by: cc radu

  • Sign in to reply
  • Cancel
  • Dudley
    Dudley over 9 years ago

    I'll move this into the raspberry pi community, where hopefully someone should be able to help you image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 9 years ago

    Hi cc,

     

    The MPL.. ic uses I2C, so you could use any generic code for that part, no need for it to be the specific code you're using.

    For example, see here:

    CIAduck's Tech Spot: MPL3115A2 sensor with Raspberry Pi

     

    I think the python code you're trying might not work because it uses a pre-built library and it might be for an older Pi (just guessing). To debug the C source code, you'd need to check where the hidef.h file resides (I don't know the location of the C source code, it was not at the github link in your post, so I couldn't check).

     

    Anyway, it is highly likely that you could try any MPL.. code (doesn't have to be for the particular board you're using) such as the one linked to above.

    • Cancel
    • Vote Up 0 Vote Down
    • 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