Show Posts
|
|
Pages: 1 ... 6 7 [8]
|
|
106
|
Forum 2005-2010 (read only) / Troubleshooting / Re: AtMega328
|
on: March 04, 2010, 02:48:56 am
|
|
Am pretty sure my connectins are correct.. I only gave connections so that i can run my program in the breadboard.. the rest of the features, i just ignored them.. Actually, 168 has only 3 PWM pins, 328 got 6 PWM pins.. Thats y i think there wld be a difference in their connections.. Also my connectins is not working....I think that 328 might have another circuit.
|
|
|
|
|
116
|
Forum 2005-2010 (read only) / Exhibition / Re: My program shows some error..Can anyone help me...
|
on: February 16, 2010, 07:59:02 am
|
|
THe problem was actually with the { }..But I get the same error again after this one...
int aPin = 0; int bPin = 1; int mtr1Pin = 2; int mtr2Pin = 3;
void setup() { pinMode(mtr1Pin, OUTPUT); pinMode(mtr2Pin,OUTPUT); } void loop() { if analogRead(aPin==0) { digitalWrite(mtr1Pin,HIGH); } else { digitalWrite(mtr1Pin,LOW); } if analogRead(bPin==0) { digitalWrite(mtr2Pin,HIGH); } else { digitalWrite(mtr2Pin,LOW); } }
|
|
|
|
|
117
|
Forum 2005-2010 (read only) / Exhibition / My program shows some error..Can anyone help me...
|
on: February 16, 2010, 07:37:20 am
|
|
int aPin = 0; int bPin = 1; int mtr1Pin = 2; int mtr2Pin = 3;
void setup() { pinMode(mtr1Pin, OUTPUT); pinMode(mtr2Pin,OUTPUT); } void loop() { if analogRead(aPin==0) digitalWrite(mtr1Pin,HIGH); else digitalWrite(mtr1Pin,LOW); if analogRead(bPin==0) digitalWrite(mtr2Pin,HIGH); else digitalWrite(mtr2Pin,LOW); }
I just wanted to know what error I made in the program
|
|
|
|
|
118
|
Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Help With LED Fading And Switch
|
on: February 17, 2010, 03:38:42 pm
|
I got a bad server..my page is loading late..I never intended to post that...Sorry you have mentioned state==1 for turning on the switch rite.. the if statement before that will need a else statement before the turn off. #define..  ..u can simply put that in int. increasing values from 0-255 1 by 1 is kinda laggy.
|
|
|
|
|
119
|
Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Help With LED Fading And Switch
|
on: February 17, 2010, 03:38:00 pm
|
I got a bad server..my page is loading late..I never intended to post that...Sorry you have mentioned state==1 for turning on the switch rite.. the if statement before that will need a else statement before the turn off. #define..  ..u can simply put that in int. increasing values from 0-255 1 by 1 is kinda laggy.
|
|
|
|
|