Can't run the python's example code

Hi I’m a very beginner.
Today I installed Brickpi3 software into my raspberrypi from this code.

curl -kL dexterindustries.com/update_brickpi3 | bash

and then I reboot.
After this, I tried to run Example codes in ~/Dexter/BrickPi3/Software/Python/Examples
But I got this error message.

Traceback (most recent call last):
  File "EV3-Color_Sensor_Color.py", line 20, in <module>
    import brickpi3 # import the BrickPi3 drivers
  File "build/bdist.linux-armv7l/egg/brickpi3.py", line 21, in <module>
IOError: [Errno 2] No such file or directory

Please help me…

That error would indicate that the SPI bus on the RPi is not enabled. Try manually enabling SPI and then rebooting and running the example again. You should be able to enable SPI in raspi-config.

1 Like