Cannot make dot3k working (Raspberry Pi2)

Hello,

I guess I’ve followed the requirements to make dot3k working, install Python, install dot3k but it looks like I’m missing something.

Any idea?

When trying to run the hello_world.py script here is what I have.

pi@raspberrypi ~/dot3k/python/examples/basic sudo ./hello_world.py Traceback (most recent call last): File "./hello_world.py", line 3, in <module> import dot3k.lcd as lcd File "/usr/local/lib/python2.7/dist-packages/dot3k/lcd.py", line 3, in <module> lcd = st7036.st7036(register_select_pin=25) File "/usr/local/lib/python2.7/dist-packages/st7036.py", line 20, in __init__ self.spi.open(0, spi_chip_select) IOError: [Errno 2] No such file or directory pi@raspberrypi ~/dot3k/python/examples/basic

SOLVED!

Apparently it was I2C issue… it looks like it was not enabled properly.
What I did was

sudo raspi-config
[8] Advanced Options
[A7] I2C
Enable Yes, Yes and reboot.

then the basic script started to work

1 Like

Yay! Sorry I didn’t get to you sooner- but glad you got it fixed!

I’m having this exact same issue with mi Pi2 and new dot3k.
All installed as per instructions:

sudo apt-get update
sudo apt-get install python-dev python-pip python-smbus
sudo pip install dot3k

The error text is exactly the same as benjamin’s.
Enabling I2C has not changed this.

Any ideas??

Ah, solved!!
Run through the Hardware Requirements here:
[https://github.com/pimoroni/dot3k/blob/master/python/library/README.md]

Had only read the first README.md on the github and it said that if you were using Python you only had to do the instructions I noted above.
Could be a little clearer.

Still requires me to run Python commands as root, which is a shame, but perhaps there’s a way around that too?
Having fun now!!

1 Like

I agree with the comment. there are two read readme, instructions are not really clear.

Still requires me to run Python commands as root

Isn’t this just a matter of device node permissions? Does it work as non-root if you add the user to the i2c group?

I’ve updated the instructions with details on the one-step installer- I hadn’t realised the Dot3k markdown pages were so awful!

I’ve also tidied up the function reference somewhat, so it’s hopefully easier to follow: https://github.com/pimoroni/dot3k/blob/master/python/REFERENCE.md

1 Like