Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
Test if the 4kOhm offset is linear throughout light ranges, if it is you could throw a 4kOhm resistor in series with the other photoresistor.
//detects more light on left side of robot if(sensor_left > sensor_right && (sensor_left - sensor_right) > threshold) {//go left servo_left(44); servo_right(44); } //detects more light on right side of robot else if(sensor_right > sensor_left && (sensor_right - sensor_left) > threshold) {//go right servo_left(25); servo_right(25); } //light is about equal on both sides else {//go straight servo_left(25); servo_right(44); }
ok so here is the reading from the 2 photoresistors under the same light first is reading 4.50second is 6.15