Arduino Forum

General Category => General Discussion => Topic started by: Haythamchahine on May 19, 2013, 12:13 am

Title: Arduino mega giving opposite results. New to arduino.
Post by: Haythamchahine on May 19, 2013, 12:13 am
Good day,
I had recently bought an arduino mega and tried on it sample projects which ended in giving me opposite results meaning the program said when you see light you turn the led on but makes the complete opposite!! So i thought it had an error with it then i went and brought a new one also an arduino mega that ended up with the same problem!!
So if any one can tell me how to fix it that would be great.
Have a great day.
Title: Re: Arduino mega giving opposite results. New to arduino.
Post by: Grumpy_Mike on May 19, 2013, 12:18 am
So I se you have wired it up wrong and your code is wrong. It is the red wire or is it the blue one, my mind reading is on the blink tonight.

Show the schematic of what you had and post the code for real help.

However as a rule the circuit is right and you are wrong.
Title: Re: Arduino mega giving opposite results. New to arduino.
Post by: retrolefty on May 19, 2013, 12:55 am

Good day,
I had recently bought an arduino mega and tried on it sample projects which ended in giving me opposite results meaning the program said when you see light you turn the led on but makes the complete opposite!! So i thought it had an error with it then i went and brought a new one also an arduino mega that ended up with the same problem!!
So if any one can tell me how to fix it that would be great.
Have a great day.


That is a very inefficient and expensive form of troubleshooting.  :D

As stated, post your sketch and a link to the wiring setup and I'm sure we can help.

Lefty