i have some problem in my arduino program i cant solve this erro . plzz i am a new with arduino. i want to rorate micro motor 16 using arduino uno. but error occurs in progrma. plzz solve this. thanks here i attach my progrma..
You would get better responses if you started a new thread and made a mention of exactly what you are trying to do in the title of your post.. That way people most familiar with the specific objective you have will be most likely to read it. Also don't forget to speak of the error you're getting, that is pretty pertinent information for someone to be able to help you!
At a glance I see you have two void setup()'s. You can only have one. And what version of Arduino are you programming with? I have 1.0.1 and it's saying wire.receive has been renamed to wire.read - Also some variables are defined twice, you can only initially define a variable once (eg. BYTE minute;)
This tripped me up when I first started c coding because I was coming from programming in other languages. As the others have said, you're using a defining syntax (one =) when trying to read a value. For example:
int a = 10;
if ( a = 10 ) { Serial.println ("A is 10."); }
is incorrect; You do not receive an error because it is a syntax, just not the syntax you want. When you are reading a variable or comparing it, you need a double equals. The correct syntax would be:
int a = 10;
if ( a == 10 ) { Serial.println ("A is 10."); }
Notice the single equals is used when placing a value in the variable, a double equals is used when reading or comparing to it. I've seen it said to help remember, imagine the double equals as a seesaw, comparing weights (or values) of each side.