Show Posts
Pages: 1 [2] 3 4 ... 3066
16  Using Arduino / Programming Questions / Re: TinyGPS++ - Failed checksum on: April 17, 2014, 04:01:50 pm
Code:
gps.encode(Serial1.read());
The encode() method returns a value. Quit discarding it.

It returns true when the end of a sentence is received, at which time you should break out of the loop and use the data.
17  Using Arduino / Programming Questions / Re: Getting a 4-digit number from a keypad on: April 17, 2014, 03:51:44 pm
Code:
if(keypad.getKey()!= NO_KEY);
{               
 char key = keypad.getKey();
Why do you need to read the key AGAIN AND AGAIN? key HAD a value when the while loop ended, or it would have if you'd used my code.. DO  NOT CREATE ANOTHER VARIABLE CALLED KEY!!!
18  Using Arduino / Programming Questions / Re: Arduino Uno & ZigBee RC HELP NEEDED. making it wireless on: April 17, 2014, 02:04:27 pm
Quote
So how would we go about setting up our series one Xbee's.
Set PAN ID, MY, and DL. Leave EVERYTHING else alone. MY on one matches DL on the other, and neither is 0x000 or 0xFFFF.

For instance, set one up with PAN ID = 3333, MY = 8001, and DL = 8000. Set the other with PAN ID = 3333, MY = 8001, and DL = 8001.

Quote
Then how would we go about editing our current code to get the wireless to work? 
Create an instance of SoftwareSerial, using pins 2 and 3, called xbee. Then, use xbee.begin(), xbee.print(), xbee.write(), xbee.println(), xbee.available(), and xbee.read(), just like Serial.XXX.
19  Using Arduino / Programming Questions / Re: Encoder driver stepper motor, not work Arduino DUE - HELP! on: April 17, 2014, 01:57:55 pm
Quote
You can directly specify the pin number in attachInterrupt().
So, did you?

If so, you modified your code, and you should post it again.

If not, get busy!
20  Using Arduino / Programming Questions / Re: dtostrf return NANO on: April 17, 2014, 01:55:44 pm
The solution has been:

if (Dirroe==Refroe) Roe=1.00;

Quote
But when results are NOT A NUMBER, in the beginning the two values ​​are zero.
So, divide by 0 doesn't work. I'm not surprised.
21  Using Arduino / Programming Questions / Re: Programming an Arduino Mega and a Mega Sensor Shield V2 for use in a Hexapod on: April 17, 2014, 01:54:11 pm
Quote
So what doi replace INT with?
Did you try LONG LONG? How about LONG LONG LONG?

If you post the code, and links to all libraries, we won't have to guess.

22  Using Arduino / Programming Questions / Re: Need help with making a password circuit + writing code on: April 17, 2014, 01:51:28 pm
Quote
First of all, how do I use the evaluation function to turn on/off the LEDs?
Code:
if(password.evaluate())
{
   // turn one led on and the other off
}
else
{
   // turn the other led on and the first one off
}

Quote
And  when I added
So, you modified your hardware and your software, and posted no new pictures OR code. I see.

Quote
it didn't work?
You're asking us? Send me the hardware, and I'll have a look. I'm sure I can tell whether it printed anything, or not.
23  Using Arduino / Programming Questions / Re: Split Message String to set PWM Values won't work on: April 17, 2014, 01:43:57 pm
Code:
SoftwareSerial mySerial(1, 0); // RX, TX
You can't do software serial on the hardware serial pins.

Code:
The Message is a string that
No, it isn't. It's a String. BIG difference.

Code:
           if(xPosition !=-1){
Don't you think it would be a good idea to test this BEFORE you assume that you can use it to define the length of a substring?

Three strikes. I quit reading.
24  Using Arduino / Programming Questions / Re: 74HC165 misses Button 8 and 16. on: April 17, 2014, 11:35:40 am
Quote
so why  is the standard  "shiftIn" function not working correct.
Because you are doing it wrong?

25  Using Arduino / Programming Questions / Re: Getting a 4-digit number from a keypad on: April 17, 2014, 11:34:01 am
Quote
but in the sentence:  if(keypad.getKey()!= NO_KEY) , I have the "!=" that means different (not equal), so has to wait till the pressing shows a key pressed. I'm right?
No, it does not wait.

This waits:
Code:
while(key = keyPad.getKey() == NO_KEY)
{
    // Do nothing
}
// Use key

But, you do NOT want to wait. You want to deal with events when they happen. You do not want to wait for them to happen.
26  Using Arduino / Programming Questions / Re: dtostrf return NANO on: April 17, 2014, 11:19:42 am
Code:
     Roe = (Dirroe+Refroe)/(Dirroe-Refroe);
What happens if Dirroe and Refroe are the same? Don't you think that you should check that?
27  Using Arduino / Programming Questions / Re: RF 433MHz Transmitter and Receiver on same Arduino on: April 17, 2014, 09:28:03 am
The code you posted does something. You didn't say what.
You want the code you posted to do something. You didn't way what.

How are we supposed to help you?
28  Using Arduino / Programming Questions / Re: Boat autopilot - PID not centralizing rudder. on: April 17, 2014, 09:23:13 am
Quote
Your method is going to see slower wind speeds due to fiction on the surface
Your making that up.  smiley-cool
29  Using Arduino / Programming Questions / Re: I want to question about the traffic lights on: April 17, 2014, 08:43:16 am
Quote
I want to question about the traffic lights
What does your incomplete code and question have to do with traffic lights?

Perhaps the fine folks at http://snippets-r-us.com could help you with your snippet.
30  Using Arduino / Programming Questions / Re: Getting a 4-digit number from a keypad on: April 17, 2014, 08:15:51 am
Quote
And is supposed the program is inside "for (int i = 0; i < 4;)" till gets four keys pressed.
I don't know what you mean by this, but getKey() is NOT a blocking function. It is NOT waiting for you to press a key.
Pages: 1 [2] 3 4 ... 3066