Show Posts
Pages: 1 ... 1182 1183 [1184] 1185 1186 ... 1906
17746  Using Arduino / Programming Questions / Re: Need help with LED problem on: January 15, 2012, 03:42:33 pm
Quote
Or did I miss the point?
Well, you're still reading "led1pin".
Code:
int led1ButtonState = digitalRead(led1Pin);
I don't know why you'd want to do that.


Maybe cut down your sketch and simplify; start simple and work up to what it is you want to do.
17747  Using Arduino / Programming Questions / Re: Need help with LED problem on: January 15, 2012, 03:31:52 pm
Code:
  pinMode(3,INPUT);
  pinMode(4,INPUT);
  pinMode(5,INPUT);
  pinMode(6,INPUT);
  pinMode(7,INPUT);
  pinMode(9,OUTPUT);
  pinMode(10,OUTPUT);
  pinMode(11,OUTPUT);
  pinMode(12,OUTPUT);
Magic numbers.
They bear no relationship to the nice names you've defined.
17748  Using Arduino / Project Guidance / Re: 9 volt battery clip! on: January 15, 2012, 03:27:10 pm
If you mean, "how would I power my Mega when away from a mains supply?" I would say "not with a 9V battery, unless you have deep pockets" (which is why I assumed you had a butler)

But, if you have deep pockets, sure go ahead.

If you don't, examine other options, like AA batteries.
17749  Using Arduino / Programming Questions / Re: Need help with LED problem on: January 15, 2012, 03:23:46 pm
Code:
int led1ButtonState = digitalRead(led1Pin);
At this point in the program, the pin is, by default, an input, but in setup, you change it to be an output.
You need to get rid of all the magic pin numbers in setup, and think about what it is you want to achieve.
17750  Using Arduino / Project Guidance / Re: 9 volt battery clip! on: January 15, 2012, 03:18:31 pm
Yes, it probably is.
But the question remains: can you really afford to waste all that expensive 9V battery heat?
17751  Using Arduino / Project Guidance / Re: 9 volt battery clip! on: January 15, 2012, 02:59:18 pm
You could post a link to what you want.
And mind your language.
17752  Using Arduino / Project Guidance / Re: 9 volt battery clip! on: January 15, 2012, 02:48:04 pm
Quote
What you mean i that i need one do you know one i can use thoD: all i want is an anser
Again, with punctuation and English, please?
17753  Using Arduino / Project Guidance / Re: 9 volt battery clip! on: January 15, 2012, 02:35:19 pm
I almost hesitate to ask, but why would you want to use a 9volt battery with a Mega?
Couldn't you ask your butler to find a clip?
17754  Using Arduino / Programming Questions / Re: pelco d encoder on: January 15, 2012, 01:04:38 pm
So you've got the protocol spec too.
What's the problem?
17755  Using Arduino / Programming Questions / Re: Interrupts not firing!? on: January 15, 2012, 12:15:43 pm
First though, you need to learn the difference between " and '
17756  Using Arduino / Project Guidance / Re: Arduino Oscilloscope: Generate On-board Image? on: January 15, 2012, 12:11:01 pm
Posts merged.
@OP.  DO NOT CROSS POST.
It wastes time.
17757  Using Arduino / Project Guidance / Re: Arduino Oscilloscope: Generate On-board Image? on: January 15, 2012, 12:05:41 pm
An image will nearly always occupy more memory than the simple readings.
Can you explain what you want to do?
17758  Using Arduino / Programming Questions / Re: While cicle - SOLVED on: January 15, 2012, 11:28:04 am
Why do you read the digital pin twice in each loop?
17759  Using Arduino / Project Guidance / Re: How to read a speedometer. on: January 15, 2012, 10:26:38 am
X-ray tomography?
17760  Using Arduino / Programming Questions / Re: Help with laser spirograph code on: January 15, 2012, 09:07:21 am
Take a look at the blink without delay tutorial
Pages: 1 ... 1182 1183 [1184] 1185 1186 ... 1906