Go Down

Topic: Color sensor controlling LEDs (Read 511 times) previous topic - next topic

Hi guys,

I'm in a project trying to get a ADJD s311 color sensor to calibrate and then control lights with the readings from the sensor using an Arduino Uno. So if the value of r is in a certain range (corresponding to a certain color) it turns on a certain number of lights etc. For this I tried to merge two files I had, slowly working all of the errors out, but it doesn't seem to be working, though it uploads to the Arduino Uno just fine. Seperately the two sketches I merged worked fine too. One is mainly for calibrating and the other was for reading and controlling the lights. The sketch reading and controlling the lights however didn't give very consistent readings, so that's why I wanted the calibration in there as well. I'd appreciate any help! Colorsensorfinal.ino is the merged file, sketch-may04b.ino is the calibrating file and color_sensornew4.ino is the file for reading and controlling the lights.

No one with experience in using color sensors?

Go Up