Not in a new thread, in a new post (in this thread).
If you keep on posting new threads about the exact same code, you will eventually end up being banned. I assume that this is a language issue (post versus thread).
Not in a new thread, in a new post (in this thread).
If you keep on posting new threads about the exact same code, you will eventually end up being banned. I assume that this is a language issue (post versus thread).
TomGeorge:
Hi,Okay so show us the circuit diagram, so we can use it as a reference to what the input and output signals are.
What is the value of the input signal when the space is occupied and unoccupied.
Post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?Thanks.. Tom...
I made it now. I used phototransistors instead photodiodes in the scheme because I couldn't find them.
TomGeorge:
Hi,
First thing I can see is you do not reset "counter" to zero each time, before doing your analogRead for loop.
So there is nothing to stop counter increasing over 6.Tom...
I would like an example please. I will be grateful.
sterretje:
Not in a new thread, in a new post (in this thread).If you keep on posting new threads about the exact same code, you will eventually end up being banned. I assume that this is a language issue (post versus thread).
yeah sorry I misunderstood
Hi,
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html
It will tell you how to attach image files and display them.
Posting files off forum makes it difficult for non PC platforms like tablets to view.
OPs diagram.
TomGeorge:
What does the analog input read when there is and there isn't a car in the space?
Tom....
when there is a car it blocks the IR so will be less then 550 in val so it should be "1"
Hi,
Try putting counter = 0;
void loop() {
Serial.println(val);
counter = 0;
for (i = 0; i < 6; i++)
{
val = analogRead(i);
if (val < 550)
counter++;
else
Tom... ![]()
TomGeorge:
Hi,
Try putting counter = 0;
Tom...
currently I have connected 1 park only (I'm out of cables and I need more space)
I tested it but when the park is empty it stays green on RGB and on LCD says "go to park 0" and changes to "park is full" every second. any idea how to fix? I cant find anything wrong
Maybe http://snippets-r-us.com/ can help you understand why we are having problems helping you. Sometimes it is acceptable to post a small part of the program like a single for(){} loop but your snippet hasn't even included the closing brace (}) of the loop and the if() at the end doesn't have anything in it.
Before you post the code again, use the auto-format feature in the Arduino IDE (Ctrl-T on your keyboard) to format the code properly. The break statement isn't indented properly and too much more of that will make it impossible for anyone (including you) to understand.
if (counter = 6)Oops
AWOL:
if (counter = 6)Oops
thanks, I think the code works now, I need to connect all the phototransistors to check.
currently 2 work (out of 6).
ok guys thanks for the help it seems to work as I connect more and more of the parts, thanks all for the help
.