Help with the Adafruit colour sensor

What's that smell?! Ask your Pi!
Coen
n00b
Posts: 7
Joined: Wed Nov 04, 2015 7:31 pm
Location: Netherlands

Re: Help with the Adafruit colour sensor

Post by Coen » Tue Jan 12, 2016 6:23 pm

BMS Doug wrote:
Great pictures, the connections are correct.
you need to copy the files onto the pi and run them on the Pi, specifically you want to run Adafruit_TCS34725_Example.py

Code: Select all

sudo python Adafruit_TCS34725_Example.py
but you need all three python files to be present in the same directory in the Pi as the example python program imports code from the other two programs.

If you follow these instructions from adafruit it will download all of the adafruit sample code for the raspberry pi, then you just need to change your working directory so that you are in the TCS34725 sub directory and run the code as described above.

Code: Select all

cd /Adafruit-Raspberry-Pi-Python-Code/Adafruit_TCS34725

Code: Select all

sudo python Adafruit_TCS34725_Example.py
I hope this helps.
Okay thanks! We'll try out soon

BMS Doug
31337
Posts: 273
Joined: Tue Sep 08, 2015 3:55 pm
Location: London

Re: Help with the Adafruit colour sensor

Post by BMS Doug » Fri Jan 22, 2016 5:49 pm

I hope that the lack of further replies means that you have got your colour sensor working.

Either way, please let us know your progress.
Doug.

Volunteer Moderator.

Coen
n00b
Posts: 7
Joined: Wed Nov 04, 2015 7:31 pm
Location: Netherlands

Re: Help with the Adafruit colour sensor

Post by Coen » Sun Jan 24, 2016 2:12 pm

BMS Doug wrote:I hope that the lack of further replies means that you have got your colour sensor working.

Either way, please let us know your progress.
We've started working on it today but we have some errors when we try to run that example.

Code: Select all

on Adafruit_TCS34725_Example.py
Traceback (most recent call last):
  File "Adafruit_TCS34725_Example.py", line 11, in <module>
    tcs = TCS34725(integrationTime=0xEB, gain=0x01)
  File "/home/pi/Adafruit-Raspberry-pi-python-Code/Adafruit_TCS34725/Adafruit_TCS34725.py", line 100, in __init__
    self.i2c = Adafruit_I2C(address)
  File "/home/pi/Adafruit-Raspberry-pi-python-Code/Adafruit_TCS34725/Adafruit_I2C.py", line 35, in __init__
IOError: [Errno 2] No such file or directory
Help?

EDIT: We just managed to solve the above problem, however, we ran into another problem.
When we try to run the command

Code: Select all

sudo python  Adafruit_TCS34725_Example.py 
we get the following error

Code: Select all

Error accessing 0x29: Check your I2C address 
.
Any suggestions?

EDIT: After soldering the Colour Sensor everything is working now, Thanks for the help Doug.

BMS Doug
31337
Posts: 273
Joined: Tue Sep 08, 2015 3:55 pm
Location: London

Re: Help with the Adafruit colour sensor

Post by BMS Doug » Wed Jan 27, 2016 5:51 pm

I'm glad that you got it working.
Doug.

Volunteer Moderator.

TimothyCoash
n00b
Posts: 4
Joined: Fri Jan 25, 2019 5:14 am
Location: Denmark
Contact:

Help with the Adafruit colour sensor

Post by TimothyCoash » Thu Jan 31, 2019 2:28 pm

Hi


Im in the same deeeeep hole, beacause in my proyect i want to take the information received by the LUX sensor and that info send it to the arduino ONE and make some stuff with the dc motor, but i have zero idea on software programming and were and how to connect the sensor on what board and pin...


Please help

many thanks

Post Reply