Pan Tilt Hat Not Detected


#1

Performed the following:

Enabled i2c via raspi-config and rebooted

curl https://get.pimoroni.com/pantilthat | bash

lsmod | grep i2c_
i2c_bcm2835 7167 0
i2c_dev 6913 0

sudo 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: – -- – -- – -- – --

python ~/Pimoroni/pantilthat/examples/smooth.py

Traceback (most recent call last):
File “smooth.py”, line 6, in
import pantilthat
File “/usr/lib/python2.7/dist-packages/pantilthat/init.py”, line 15, in
pantilthat = PanTilt(i2c_bus=SMBus(1))
File “/usr/lib/python2.7/dist-packages/pantilthat/pantilt.py”, line 63, in init
self._set_config()
File “/usr/lib/python2.7/dist-packages/pantilthat/pantilt.py”, line 100, in _set_config
self._i2c_write_byte(self.REG_CONFIG, config)
File “/usr/lib/python2.7/dist-packages/pantilthat/pantilt.py”, line 191, in _i2c_write_byte
raise IOError(“Failed to write byte”)
IOError: Failed to write byte

Using latest Raspbian image

uname -a
Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux

Am I missing something obvious?


#2

Not as far as I’m aware, is the Pan Tilt HAT pushed firmly down on the Pi?


#3

Thanks, that’s what I thought. Tried a different rpi and it worked flawlessly.


#4

Your i2c detect shows nothing detected. Hammer headers or soldered headers?


#5

They’re soldered. The pi that doesn’t work I just bought, may be defective?


#6

It’s possible, do you have another SD card to try in it? Or did you switch the SD card and Pan Tilt HAT over to your other Pi?