Display-o-tron 3000 Raspberry Pi 2 Errorno 2

Hi,

Tried to install the DOT3K on Raspberry Pi 2 and having no joy running the example code:
pi@raspberrypi ~/Pimoroni/dot3k/basic python2 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 ~/Pimoroni/dot3k/basic

I’ve run the installer (curl get.pimoroni.com/dot3k | bash) and enabled SPI I2C etc
I’ve tried the update and upgrade on apt-get

running a i2cdetect -q 1 gives me:
pi@raspberrypi ~/Pimoroni/dot3k/basic $ i2cdetect -q 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1 using quick write commands.
I will probe address range 0x03-0x77.
Continue? [Y/n]
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- 54 – -- – -- – -- – -- – -- –
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --

Whereas i2cdetect -y 1
pi@raspberrypi ~/Pimoroni/dot3k/basic $ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --

Can anyone help as I am starting to think I have a faulty unit?

Ahoy! What you’re seeing is an SPI error, rather than an I2C one. Can you post the output of:

ls /dev/spi*

lsmod

It might also be worth enabling SPI again through raspi-config. Also, how up-to-date is your Raspbian install? SPI/I2C issues seem to crop up a lot and are almost always fixed with a fresh Raspbian image- I still haven’t figured out why, though.

pi@raspberrypi ~ $ ls /dev/spi*
ls: cannot access /dev/spi*: No such file or directory

lsmod has:
pi@raspberrypi ~ $ lsmod
Module Size Used by
cfg80211 395318 0
rfkill 16651 1 cfg80211
i2c_dev 6027 0
snd_bcm2835 18850 3
snd_pcm 75388 1 snd_bcm2835
snd_seq 53078 0
snd_seq_device 5628 1 snd_seq
snd_timer 17784 2 snd_pcm,snd_seq
snd 51667 11 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
joydev 8903 0
i2c_bcm2708 4990 0
evdev 9950 8
uio_pdrv_genirq 2958 0
uio 8119 1 uio_pdrv_genirq

Tried the reenable SPI … raspi-config --> " The SPI interface is enabled "

Raspbian install is the latest image from the website.

OK

Took the original image I had for Raspbian (05-05-2015) Wheezy
Wrote a new memory card
1st Book - Expanded File System, changed user passwd, enabled SPI
Rebooted
and I now have /dev/spidev0.0 and spidev0.1

Installed the DOT3K via Curl including demo files
and
it works!
need to run python2 via sudo otherwise I get No access to /dev/mem?

Will try work out what was stopping it as the only thing I’d done with previous install was amend font size in terminal via dkpg-reconfigure console-setup and installed Kernel for a 4DPi LCD Screen which was subsequently disabled.

1 Like

You were running an alternate Kernel? ( IE: The LCD screen was disabled but not the kernel itself? ) From my own experience building Kernels it’s really easy to botch up SPI/I2C/GPIO functionality in a custom build. If you were running a custom, then that’d almost certainly be what went wrong :(