I've setup all the components correctly on the breadboard, or at least I think so (see picture attached).
After writing the software for the project and uploading it to Arduino,
I can't manage to let the LED work.
The problem I think is somehow related to the photoresistors, which always report in the serial monitor "0" as read for all of the 3 photoresistors.
I've tried to upload the original sketch wrote by Arduino's contributors, but still I get the same read from the sensors.
Anyone could help me in solving this issue?
I really would like to understand the reason of this behaviour
The red wire that links the two positave rails on the bread board is actually going to the negitave rail on the lower one. This means that there is no positave voltage going to the photo resistor's and they will always read zero.
This illustrates what I have always said about physical layout diagrams, although they are a good way to get something to work, they are not much good at getting you to think what you are doing.
When you wire one up the dialogue in your head is something like:-
"The top horizontal line of this bread board goes to the bottom horizontal line"
Where as if you are following a schematic and having to make up the layout you are saying to yourself:-
"Connect the positive rail at the top to the positive rail at the bottom."
This illustrates what I have always said about physical layout diagrams, although they are a good way to get something to work, they are not much good at getting you to think what you are doing.
When you wire one up the dialogue in your head is something like:-
"The top horizontal line of this bread board goes to the bottom horizontal line"
Where as if you are following a schematic and having to make up the layout you are saying to yourself:-
"Connect the positive rail at the top to the positive rail at the bottom."
Yes you are right,
expecially for newbies like I am.
This illustrates what I have always said about physical layout diagrams, although they are a good way to get something to work, they are not much good at getting you to think what you are doing.
When you wire one up the dialogue in your head is something like:-
"The top horizontal line of this bread board goes to the bottom horizontal line"
Where as if you are following a schematic and having to make up the layout you are saying to yourself:-
"Connect the positive rail at the top to the positive rail at the bottom."
thank you i followed the book blindly and didn't notice that i had two ground
Hi!
Could you tell me please the difference between the method "print" and "println" ? I noticed in the code of this project that when we print out the values (lines 25-30 and 34-39) we use "println" just for the last line. Example :
Report the sensor readings to the computer:
25 Serial.print("Raw Sensor Values \t red: ");
26 Serial.print(redSensorValue);
27 Serial.print("\t green: ");
28 Serial.print(greenSensorValue);
29 Serial.print("\t blue: ");
30 Serial.println(blueSensorValue);
Your post has nothing to do with the original post - this is known as thread hijacking. Please read the 'How to use this forum' thread at the top of each section.