Show Posts
Pages: 1 ... 51 52 [53] 54 55 ... 71
781  Using Arduino / Installation & Troubleshooting / Re: Error on compile -stdlib.h not found on: February 25, 2012, 07:15:42 pm
It appears that the culprit is Puppy Linux 5.3
Version 5.3.1 runs Arduino well and I would say they patched it following my posts

So you're saying my question regarding what distro you're using was relevant?
782  Using Arduino / Programming Questions / Re: "Serial" not declared in 1.0 on: February 21, 2012, 02:54:35 am
I suspect you've selected the incorrect board type.
783  Using Arduino / Programming Questions / Re: Getting Started With Arduino and C on: February 15, 2012, 12:00:06 am
Quote
The microcontroller on the board is programmed using the Arduino programming language (based on Wiring)

If you follow that link you quoted you find this:

Quote
The Arduino language is based on C/C++.

It's not a total secret.

Well java is also based on C++. It should say "The Arduino language is C++" No messing around with the "C/C++" since writing code that compiles in C but not in C++ doesn't work.
784  Using Arduino / Programming Questions / Re: millis() function on: February 14, 2012, 02:08:44 am
So why do we divide it by 1000 ?
wont that make it to become even smaller ?

1 second is 1000 miliseconds.
1000 (milliseconds) / 1000 = 1 second.

Magic.

Since milliseconds are a small unit of measure, numbers of milliseconds are generally large. Just like you expect something to be 100 pounds much more than 100 tons. So the unit is smaller, the number is bigger. You're diving the number so make the number smaller and the unit bigger.
785  Using Arduino / Installation & Troubleshooting / Re: trouble uploading program on: February 14, 2012, 02:06:18 am
Why did you put a title of "troubling uploading program" when you said it uploads with no problem?

Anyway, your problem is this:

RTHRESH1<RPMVALUE<=RTHRESH2

RTHRESH1 < RPMVALUE returns either a true or a false - a 1 or a 0. RTHRESH2 is likely to be greater than or equal to that isn't it?

You have to do something like this:
Code:
if (RTHRESH1 < RPMVALUE && RPMVALUE <= RTHRESH2)

Also, it sounds like you need to learn about arrays. And variable names in ALL CAPITALS generally mean they're #define'd constants. Good coding standards usually say you shouldn't use them for actual variables.
786  Using Arduino / Installation & Troubleshooting / Re: Problem with IDE on: February 14, 2012, 02:00:41 am
Your arduino does what you tell it to do. One particularly visible and easy to set up thing it can do is print to the serial monitor. Try running the DigitalReadSerial example to print out the current value of a pin.

Of course, you need to think up something you want it to do before you can start really using it.
787  Using Arduino / Programming Questions / Re: ASCII - Convert DEC to Character on: February 14, 2012, 01:34:29 am
Neither "ASCII DEC" nor "Character" really make any sense. Are you saying that you want to take an ASCII-encoded decimal number, like '4', and turn it into an int?

If you're starting with a char (one letter; it's what's returned by Serial.read()), the simplest way is to subtract '0'. Since the ASCII codes for numbers are in order, subtracting '0' means that '0' will become 0, '1' will become 1, '2' will become 2, and so on.

If you're starting from a NULL-terminated string, you can use atoi (google it)
788  Using Arduino / Programming Questions / Re: NOOB of NOOBS can't figure out what's wrong? on: February 11, 2012, 11:50:28 pm
if (buttonState = HIGH)

= sets a variable to a value
== checks to see if the variable is equal to a value.
789  Development / Suggestions for the Arduino Project / Re: Report bug... WString Replace("xxx","yyy") on: February 11, 2012, 02:02:42 am
They're the same thing to the compiler, and the version used looks nicer.
790  Using Arduino / Programming Questions / Re: programing libraries on: February 11, 2012, 12:43:06 am
or /usr/avr/include/avr/pgmspace.h

However, pgmspace.h has nothing to do with programming a library unless you're trying to use flash memory to store data.
791  Using Arduino / Installation & Troubleshooting / Re: Serial.print() overflow problems on: February 11, 2012, 12:35:49 am

liudr, thanks for the info, very helpful. Especially,

or is this out of bounds for what you're up to?


I'm afraid so but willing to learn smiley-roll-sweat smiley-roll-sweat smiley-roll-sweat

Is "svt.elf" a file name or a fancy option?

file name; if you enable verbose output while compiling (in the preferences menu) you can see where the file is. It will be the name of your sketch (without the .ino or .pde) and then .cpp.elf
792  Using Arduino / Programming Questions / Re: Infrared Sensor on: February 09, 2012, 12:59:36 am
Is that the first error message? Do you have the IRremote library? Pay attention to capitalization.
793  Using Arduino / Programming Questions / Re: Programming a servo. on: February 08, 2012, 02:13:15 am
Quote
Can anyone point me in the wright direction?

PS. Pay more attention in your spelling class.
Obviously he's dropping subtle hints he's building an airplane
794  Using Arduino / Programming Questions / Re: Timer on delay? on: February 08, 2012, 02:03:08 am
Yes, you do. If you spend your life thinking and concentrating about absolutely nothing but breathing (kind of like your arduino does when you use delay), you'll need to change something that works (breathing) in order to accommodate other activities.
795  Using Arduino / Programming Questions / Re: Pointer and integer comparison on: February 08, 2012, 02:00:30 am
How do you compare {0x28, 0x94, 0xBB, 0x60, 0x03, 0x00, 0x00, 0x38} to an int?

By the way, DEC is #defined as 10, so that code is just asking if {0x28, 0x94, 0xBB, 0x60, 0x03, 0x00, 0x00, 0x38} <= 10. Since they're both constants, I fail to see how that's useful (assuming it was possible)
Pages: 1 ... 51 52 [53] 54 55 ... 71