Go Down

Topic: Project 4: Photoresistors generating widely unreliable output (Read 794 times) previous topic - next topic

SheCurvesMobius

I've been trying to trouble-shoot this on my own for a few hours and I can't figure out what the issue is.

The three photoresistors are generating very inconsistent numbers. The below are readouts taken at three second intervals (I added a delay(3000) to the code). In the first five readouts, all resistors are uncovered. In the second set of five I covered the RED resistor completely.

Note that there is significant variation while the sensor is not covered, and that covering the sensor doesn't seem to affect the output at all (it is equally inconsistent).

The light source is daylight from a window--there is no perceptible variation from moment to moment in the quality or intensity of the light. I tried moving the board to a darker environment and it flickered even more.

Thanks for any help you might be able to offer.


Not covering the red sensor
Raw Sensor Value              Red:859    Green:860    Blue:860
Mapped Sensor Values     Red:214     Green:215    Blue:215

Raw Sensor Value              Red:537    Green:471    Blue:470
Mapped Sensor Values     Red:134     Green:117    Blue:117

Raw Sensor Value              Red:296    Green:852    Blue:860
Mapped Sensor Values     Red:74     Green:213    Blue:215

Raw Sensor Value              Red:833    Green:695    Blue:694
Mapped Sensor Values     Red:208     Green:173    Blue:173

Raw Sensor Value              Red:330    Green:850    Blue:859
Mapped Sensor Values     Red:82     Green:212    Blue:214


Covering the red sensor
Raw Sensor Value              Red:450    Green:454    Blue:363
Mapped Sensor Values     Red:112     Green:113    Blue:90

Raw Sensor Value              Red:280    Green:677    Blue:452
Mapped Sensor Values     Red:70     Green:169    Blue:113

Raw Sensor Value              Red:830    Green:686    Blue:585
Mapped Sensor Values     Red:207     Green:171    Blue:146

Raw Sensor Value              Red:670    Green:671    Blue:518
Mapped Sensor Values     Red:167     Green:167    Blue:129

Raw Sensor Value              Red:664    Green:835    Blue:697
Mapped Sensor Values     Red:166     Green:208    Blue:174


Not covering the red sensor
Raw Sensor Value              Red:829    Green:516    Blue:433
Mapped Sensor Values     Red:207     Green:129    Blue:108

Raw Sensor Value              Red:291    Green:271    Blue:282
Mapped Sensor Values     Red:72     Green:67    Blue:70

Raw Sensor Value              Red:281    Green:848    Blue:527
Mapped Sensor Values     Red:70     Green:212    Blue:131

Raw Sensor Value              Red:304    Green:829    Blue:848
Mapped Sensor Values     Red:76     Green:207    Blue:212

Raw Sensor Value              Red:828    Green:685    Blue:828
Mapped Sensor Values     Red:207     Green:171    Blue:207

Raw Sensor Value              Red:691    Green:584    Blue:607
Mapped Sensor Values     Red:172     Green:146    Blue:151

Go Up