I have used the VEML7700 in the past on my RPi, and it worked wonderfully. Recently I booted up the same code on the same pi, and I am now getting an error. Here is the code:
Code: Select all
import RPi.GPIO as GPIO
import time
import os
import busio
import digitalio
import board
import adafruit_veml7700
i2c = busio.I2C(board.SCL, board.SDA)
veml7700 = adafruit_veml7700.VEML7700(i2c)
Code: Select all
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/adafruit_bus_device/i2c_device.py", line 172, in __probe_for_device
self.i2c.writeto(self.device_address, b"")
File "/usr/local/lib/python3.7/dist-packages/busio.py", line 116, in writeto
return self._i2c.writeto(address, buffer, stop=stop)
File "/usr/local/lib/python3.7/dist-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 49, in writeto
self._i2c_bus.write_bytes(address, buffer[start:end])
File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/smbus.py", line 308, in write_bytes
self._device.write(buf)
OSError: [Errno 6] No such device or address
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/adafruit_bus_device/i2c_device.py", line 178, in __probe_for_device
self.i2c.readfrom_into(self.device_address, result)
File "/usr/local/lib/python3.7/dist-packages/busio.py", line 106, in readfrom_into
return self._i2c.readfrom_into(address, buffer, stop=stop)
File "/usr/local/lib/python3.7/dist-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 56, in readfrom_into
readin = self._i2c_bus.read_bytes(address, end - start)
File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/smbus.py", line 179, in read_bytes
return self._device.read(number)
OSError: [Errno 6] No such device or address
During handling of the above exception, another exception occurred:
File "garageTemp.py", line 17, in <module>
veml7700 = adafruit_veml7700.VEML7700(i2c)
File "/usr/local/lib/python3.7/dist-packages/adafruit_veml7700.py", line 205, in __init__
self.i2c_device = i2cdevice.I2CDevice(i2c_bus, address)
File "/usr/local/lib/python3.7/dist-packages/adafruit_bus_device/i2c_device.py", line 68, in __init__
self.__probe_for_device()
File "/usr/local/lib/python3.7/dist-packages/adafruit_bus_device/i2c_device.py", line 180, in __probe_for_device
raise ValueError("No I2C device at address: %x" % self.device_address)
ValueError: No I2C device at address: 10
Code: Select all
pi@raspberrypi:~ $ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: 10 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Not sure what to do. Any assistance is greatly appreciated!