CyntechUK / WeatherHAT

10 stars 3 forks source link

Error last step #2

Closed Quentinvarquet closed 8 years ago

Quentinvarquet commented 8 years ago

Hello,

I did all the command you gave but for the last step I have an error ...

root@raspberrypi /opt/WeatherHAT # sudo python cycle.py
Traceback (most recent call last):
  File "cycle.py", line 4, in <module>
    wh = WeatherHat()
  File "/opt/WeatherHAT/weatherhat.py", line 37, in __init__
    self.bus = SMBus(i2c_bus)
IOError: [Errno 2] No such file or directory
Exiting cleanly

`

Do you know why ?

Boeeerb commented 8 years ago

Quentinvarquet,

Can you check that i2c is enabled - typing in; sudo i2cdetect -y 1 Will either error out that it isn't enabled, or give a list - Hopefully with numbers mixed in which case points elsewhere

Quentinvarquet commented 8 years ago

Hello, Fixed.

I had to do this : https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c

If someone is using rasbian, you need to read the " Installing Kernel Support (Manually) " part.

Thank you :)