Hi everyone,
Did anyone faced this issue while trying to work with VCNL4000 proximity sensor?
Trying to use this code from this repo ( https://github.com/marcoschwartz/RaspberryPiCode ) but when invoking this code:
#!/usr/bin/python from VCNL4000 import VCNL4000 import time # =========================================================================== # Example Code # =========================================================================== # Initialise the VNCL4000 sensor vcnl = VCNL4000(0x13) # Print proximity sensor data every 100 ms while True: print "Data from proximity sensor", vcnl.read_proximity() time.sleep(0.1)
When trying to see if the sensor is wired up correctly I get the following output:
pi@raspberrypi ~ $ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- 13 -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --
The CPU info of my Raspberry Pi looks like:
Processor : ARMv6-compatible processor rev 7 (v6l) BogoMIPS : 697.95 Features : swp half thumb fastmult vfp edsp java tls CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xb76 CPU revision : 7 Hardware : BCM2708 Revision : 000e Serial : 000000007b9b5e3c
Can anyone tell me what would be the reason why I'm getting this error when running the above script?
Data from proximity sensor Error accessing 0x13: Check your I2C address Error accessing 0x13: Check your I2C address Error accessing 0x13: Check your I2C address -1