I have a problem with my program and I know that the problem is in the code, does anyone know to tell me that I am missing or should I change? Thank you.
"I have a problem with my program" is not very specific. Your program does precisely what you told it to do. Please tell us what you intended it to do versus what it does. Knowing what is connected and how it is connected would also be useful.
Even a newbie with only three posts should know not to post a picture of the code. Instead, obey the following instructions. The instructions are free. You are welcome.
To post code and/or error messages:
- Use CTRL-T in the Arduino IDE to autoformat your complete code.
- Paste the complete autoformatted code between code tags (the </> button)
so that we can easily see and deal with your code. - Paste the complete error message between code tags (the </> button)
so that we can easily see and deal with your messages. - If you already posted without code tags, you may add the code tags by
editing your post. Do not change your existing posts in any other way.
You may make additional posts as needed. - Please provide links to any libraries that are used
(look for statements in your code that look like #include ). Many libraries
are named the same but have different contents.
Before posting again, you should read the three locked topics at the top of the Programming Questions forum, and any links to which these posts point.
If your project involves wiring, please provide a schematic and/or a wiring diagram and/or a clear photograph of the wiring.
Good Luck!
Your if statements have semicolons at the end. That will cause the statements that follow the if statements to execute unconditionally. Lose the semicolons.
Hi,
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Thanks.. Tom...