1

I just received a Microstack Accelerometer about a week and a half ago. I put the Accelerometer onto the Microstack Baseboard and followed all of the instructions that were provided here.

When I go to run the example in the command line: python3 /usr/share/doc/python3­microstacknode/examples/accelcat.py, it gives this error:

pi@raspberrypi ~ $ python3 /usr/share/doc/python3-microstacknode/examples/accelcat.py  Traceback (most recent call last): 
  File "/usr/share/doc/python3-microstacknode/examples/accelcat.py", line 8, in <module> 
    accelerometer.init() 
  File "/usr/lib/python3/dist-packages/microstacknode/accelerometer/mma8452q.py", line 115, in init 
    self.standby() 
  File "/usr/lib/python3/dist-packages/microstacknode/accelerometer/mma8452q.py", line 127, in standby 
    self.ctrl_reg1.value &= 0xff ^ CTRL_REG1_SET_ACTIVE 
  File "/usr/lib/python3/dist-packages/microstacknode/accelerometer/mma8452q.py", line 213, in value 
    v)) 
  File "/usr/lib/python3/dist-packages/microstackcommon/i2c.py", line 85, in transaction 
    ioctl(self.fd, I2C_RDWR, ioctl_arg)  IOError: [Errno 5] Input/output error

When I run sudo i2cdetect -y 1 I get a blank table.

Here is my setup:

Why is this not working?

The documentation doesn't really help you if there was an error.

I am a pretty big noob when it comes to Rasbian, so the more dumbed down the answer, the better.

Any help would be nice!

4
  • If you get a blank table the I2C device is not connected properly. Could you post a photo of your set up and detail the connections you have made between the Pi and the I2C device?
    – joan
    Commented Apr 26, 2015 at 9:45
  • I can't see that much can go wrong if it's simply a case of plugging a board over the Pi. No chance of getting anything the wrong way round? Until it is visible to i2cdetect there is no point in running other software.
    – joan
    Commented Apr 26, 2015 at 16:51
  • I have the same problem, a Pi 2 Model B and the Microstack Baseboard and the Acceleratorometer and GPS neither of which work. Like you my i2C table is blank but the drivers are loaded. I have two baseboards and get the same with either so really scratching. Has anyone got this to work?? I have a call in with Element14 but so far they have not got back to me. Thanks, Scott.
    – user30812
    Commented May 13, 2015 at 0:12
  • try disabling file_tree in raspi-config -> advanced. That enabled me to see my devices in i2c, but I still haven got them working...
    – user31070
    Commented May 20, 2015 at 14:06

1 Answer 1

2

I had the same problems. I'd given up when persistence got the better of me and I came across this: https://github.com/microstack-IoT/python3-microstacknode/issues/1

From your photo I'd say you are one of the 'couple' of boards made without the connection between pin 2 and 3 on JP1.

Missing connection.

You need to bridge this connection (I stuck a bent staple in the holes, but soldering may be better)!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.