Hey guys
I am trying to program my arduino to make one number bigger with one and at the same time to make other number smaller with one.Here is my code
int a=1500;
int b;
void setup()
{
Serial.begin(9600);
}
void loop()
{
delay(1000);
b=a;
a++;
if(a++)
{
b--;
}
Serial.print("I make it ");
Serial.println(b, DEC);
}
could you tell me what i am doing wrong because i am receiving this:
I make it 1499
I make it 1501
I make it 1503
I make it 1505
and etc..
PS.Sorry for my bad english