Show Posts
Pages: [1] 2 3 ... 3064
1  Using Arduino / Programming Questions / Re: Creating a Web Server: Multiplexer & Ethernet Shield on: Today at 05:07:52 am
Quote
I have written the following code but it doesn't work.
Assuming that the code you pasted doesn't actually look like that, it DOES work. It just doesn't do what you want. But, without knowing what it ACTUALLY does, and without knowing what you want it to do, we don't have a snowballs chance in hell of helping you.
2  Using Arduino / Programming Questions / Re: MPU6050 and Timer1 conflict on: Today at 04:56:19 am
Code:
ISR(TIMER1_COMPA_vect){//timer1 256Hz
  Serial.println("E");
  timer_sw = 1;
}
Interrupts are disabled during an interrupt service routine. Doing things in the ISR that rely on interrupts being enabled is stupid. Stop doing it.

3  Using Arduino / Programming Questions / Re: changing program to read data from 3 sensors on: Today at 04:35:46 am
Quote
1- If I connect more than 1 pressure sensor to the board, is it necessary to change the program?
That depends on what the program currently does.

Quote
2- is it possible to change it easily?
Sure. All you need is an editor. The IDE just happens to include one.

Quote
3- is there any ready program that I can just replace with the existed one in EPROM of the board to fulfill my need?
No. If you don't intend to learn to program, don't buy the Arduino.
4  Using Arduino / Programming Questions / Re: About that *pt2Function thing on: Today at 04:32:51 am
Quote
Is *pt2Function the name of something important
In what context?

I'd guess that the name means something like "pointer to function", in which case you supply the name (which the compiler translated to address) of the function you want to be called.

Quote
or can I use any name, like *callback?
If you do, I'll personally come kick your ass. Use a name that defines what the function does, not some stupid generic name that means nothing.
5  Using Arduino / Programming Questions / Re: Struct return in Library on: Today at 04:27:52 am
Wrapping an array in an struct is not the best way to return an array from a function. If the array is statically sized in the struct, the caller should create the array, and pass a reference to it to the function that needs to populate it.

So, why are you wrapping the array in a struct?

If you must, define the struct in a header file, included in the library and the sketch.
6  Using Arduino / Programming Questions / Re: Arduino Uno & ZigBee RC HELP NEEDED. making it wireless on: April 16, 2014, 01:53:05 pm
Quote
What shields would you suggest?
I have this one:
https://www.sparkfun.com/products/10854

Using one of these:
https://www.sparkfun.com/products/8687
makes configuration so much easier.

Hey, it's only money.   smiley-cool
7  Using Arduino / Programming Questions / Re: Serial communication does not work correctly between Arduino and Processing on: April 16, 2014, 01:45:36 pm
Quote
A part of the arduino code
So, you were looking for a part of an answer? Somehow, I don't think so.
8  Using Arduino / Programming Questions / Re: Having trouble "inserting" new characters to a String object. on: April 16, 2014, 01:42:29 pm
Code:
Serial.println(dMessage.charAt(0));
Add , HEX to the end of this, to see what value it really holds.
9  Using Arduino / Programming Questions / Re: true false help? if (!variable){} on: April 16, 2014, 11:47:07 am
Quote
What is a boolean?
http://arduino.cc/en/Reference/BooleanVariables

Quote
if the SD card does initialize on pin 4 does SD.begin(4) return a 0 as true? and if it does not initialize on pin 4 then does SD.begin(4) return a 1 as false?
No. It returns true or false. Do not be concerned about the values that correspond to true or false.

Quote
when i connect pin 4 to the SD module and my code includes the following then both messages "YES" and "NO" are displayed but why????? only yes is suppose to display
Why do you think that? The first call to begin() succeeded, so YES got printed. The second one failed, because the card is in use, so NO got printed.
10  Using Arduino / Programming Questions / Re: Arduino Uno & ZigBee RC HELP NEEDED. making it wireless on: April 16, 2014, 11:13:44 am
I'd recommend removing the XBee from that shield, and throwing that shield away. Of all the XBee shields available, that is absolutely the worst of the bunch.

If you are stuck using it, then Serial.print() will send data to the XBee, which will broadcast it. The receiving XBee will put data on the serial port, and you can read it using Serial.available() and Serial.read() (with Serial.begin() on both ends, of course).

Now, how have you configured the XBees? Or have you?
11  Using Arduino / Programming Questions / Re: true false help? if (!variable){} on: April 16, 2014, 11:09:57 am
SD.begin() returns a boolean. If the code you modified does not show the message you expect, you need to post all of your code, not just a little snippet.

12  Using Arduino / Interfacing w/ Software on the Computer / Re: PROCESSING + ARDUINO on: April 16, 2014, 09:39:32 am
Why are you trying to negate a string?

Read the whole string in serialEvent, up to the \n. Then, use split to split the String, and float [] to make an array of floats of the pieces that the String gets split into.
13  Using Arduino / Programming Questions / Re: 1st code on: April 16, 2014, 09:26:25 am
How do you intend to get the code onto the Arduino without using the IDE?

If you do have the IDE, why didn't you at least compile the code you posted?
14  Using Arduino / Programming Questions / Re: Can Arduino Playground code for an Arduino Uno be used for SainSmart Uno on: April 16, 2014, 09:02:22 am
Quote
And Paul, this forum isn't just for Arduino Hardware, it's for Arduino software issues as well, so stop being a bigot :-)
Who pays for this forum? It isn't SainSmart.
15  Using Arduino / Programming Questions / Re: Arduino Uno & ZigBee RC HELP NEEDED. making it wireless on: April 16, 2014, 08:23:06 am
Quote
We have spent the last 3 weeks trying to code the xbee's to transmit the signal from one to another.
Getting one Arduino to talk to another, via XBees, is pretty simple. Just how simple depends on which kind of XBees you are using (Series 1 for point to point makes the most sense), how you have configured them, and how you are attaching them to the Arduinos.

Once we know this, the rest is easy.
Pages: [1] 2 3 ... 3064