Show Posts
Pages: 1 ... 1069 1070 [1071] 1072 1073 ... 1892
16051  Using Arduino / Programming Questions / Re: Lines Of Code I Can't Seem To Fix on: April 12, 2012, 09:10:58 am
Code:
  val = digitalRead(BUTTON_1);
  val = digitalRead(BUTTON_2);
  val = digitalRead(BUTTON_3);
  val = digitalRead(BUTTON_4);
You're going have to look at why this doesn't work next.
16052  Using Arduino / Programming Questions / Re: Lines Of Code I Can't Seem To Fix on: April 12, 2012, 09:02:27 am
No, your "declaration" of "old_val" is inside a comment, so isn't seen by the compiler.
Revoce the "//"
16053  Using Arduino / Programming Questions / Re: Lines Of Code I Can't Seem To Fix on: April 12, 2012, 08:55:36 am
Code:
//int old_val = 0;
That was easy.
16054  Development / Suggestions for the Arduino Project / Re: Bug in Arduino IDE 1.0 on: April 12, 2012, 08:10:49 am
About the only time* you should ever have three of the same punctuation mark consecutively is for ellipsis...
Do you have some obscure text protocol that requires consecutive exclamation marks?

*except maybe opening or closing parentheses.
16055  Using Arduino / Microcontrollers / Re: Arduino vs standalone microcotroller programming on: April 12, 2012, 07:59:40 am
Here
16056  Using Arduino / Microcontrollers / Re: RAM RAM I need more RAM!! on: April 12, 2012, 07:53:41 am
Quote
And, wasting RAM doesn't make code slow.
It depends how you waste it.
16057  Using Arduino / Programming Questions / Re: compare 8-bit with int type on: April 12, 2012, 07:51:32 am
I'm not sure what you're asking, but your transmitter is writing ASCII representations of numbers, but your receiver is comparing binary.

Tx:
Code:
Serial.print(Send);

Rx:
Code:
if(Read == 1

Try:
Code:
if(Read == '1'
16058  General Category / General Discussion / Re: New Here - Looking for project help on: April 12, 2012, 07:24:08 am
Quote
Picture is worth a thousand words, as the saying goes...
But 1000 words is just less than 2kB, but your picture is over 60kB   smiley-yell
16059  General Category / General Discussion / Re: Arduino on: April 12, 2012, 07:22:40 am
Quote
There are other costs: your time, your patience and your passion
Not to mention your hair
16060  Using Arduino / LEDs and Multiplexing / Re: loops on: April 12, 2012, 05:42:34 am
Code:
void do_task(num)
Let's assume the type of "num" is an "int", because the compiler can't.
You need to tell it.

Then there's the problem that there's nowhere in "loop" that there's a variable called "num" in scope, but you still assign the value 1 to it..

And "if" is spelled "if", not "If".
16061  Using Arduino / Project Guidance / Re: getting image data from camera on: April 12, 2012, 04:40:51 am
It is feasible to do a partial decode of the JPEG to get only the DC components of the image (which are only delta coded) and form a thumbnail and process that, but with a source image only 160x120, the thumbnail would only be 20x15.
I have done this in the past, but the processor was 32 bit, a little faster and had a barrel shifter, which made unpacking the Huffman-coded image quite a bit quicker.
16062  Using Arduino / Project Guidance / Re: getting image data from camera on: April 12, 2012, 04:06:16 am
Quote
I don't know how the JPEG data looks but I'm afraid it's not pixel by pixel data. It might be just bunch of compressed values.
Correct. The pixel data is transformed into the frequency domain and the results compressed.
16063  Using Arduino / Programming Questions / Re: please help me with this code on: April 12, 2012, 02:25:09 am
Code:
P0_1=HIGH; /*Left motor running in forward direction.*/
P0_2=LOW;
P0_3=LOW; /*Right motor is not running.*/
P0_5=LOW;
delay(50); /*50ms time delay*/
P0_1=LOW; /*Motors not running in any direction*/
P0_2=LOW;
P0_3=LOW;
P0_5=LOW;
delay(50); /*50ms time delay*/
You're not actually writing to any hardware, so the delay does nothing except slow down the assignment of some variables.
Maybe pop in some "digitalWrite"s?

Code:
if(s1==1&&s5==1&&s3==1);
BZZZZT!

You're only reading your sensors in "setup", so their values will never be updated in loop.
This may not be what you want.

(please use code tags when posting code, and use the IDE's auto-format tool before posting code, and please DON'T SHOUT)
16064  Using Arduino / Programming Questions / Re: Is is possible to run two loops simultaneously?? on: April 12, 2012, 02:15:32 am
It usually takes a little longer than 30 minutes to play and experiment with the blink without delay tutorial.
16065  Using Arduino / Programming Questions / MOVED: If a program could program itself?.... (AI) on: April 12, 2012, 01:47:03 am
This topic has been moved to General Discussion.

http://arduino.cc/forum/index.php?topic=100922.0
Pages: 1 ... 1069 1070 [1071] 1072 1073 ... 1892