Show Posts
Pages: 1 2 3 [4] 5 6 ... 230
46  Using Arduino / Programming Questions / Re: Illogical Type Changing on: September 03, 2014, 05:05:19 pm
I think this causes from IDE

The IDE doesn't compile code, so I don't see how that's possible.
47  Using Arduino / Programming Questions / Re: Storing Fractional Number on: September 03, 2014, 05:00:23 pm
I just tried to use "Float" , but it stores only two digits after point .

Incorrect. It stores a lot more than two digits. You're likely only seeing two digits because that is the default number of digits printed by the stream class.

See here: http://arduino.cc/en/Serial/Print

Quote
An optional second parameter specifies the base (format) to use; permitted values are BIN (binary, or base 2), OCT (octal, or base 8 ), DEC (decimal, or base 10), HEX (hexadecimal, or base 16). For floating point numbers, this parameter specifies the number of decimal places to use. For example:
48  Using Arduino / Project Guidance / Re: Xbee networking help???? on: September 03, 2014, 03:51:40 pm
Thx for reply.But how can i do that?

You have to come up with a protocol. A simple one would include a start byte, delimiter and stop byte. Anything between the start byte and deliminator is the "address". Anything between the delimiter and the stop byte is the value. Example:

Code:
"<1:123>"

The  '<' and the '>' are the start and stop bytes, respectively. the '1' is the address. the ':' is the delimiter. The "123" is the value. Since it's ASCII encoded, you'll need to use something like atoi() to convert the values into actual numeric values.
49  Using Arduino / Programming Questions / Re: why error msg "Some files are marked \"read-only\"... on: September 03, 2014, 11:32:47 am
This typically happens when you try to save a sketch inside the examples folder. Where are you saving these sketches?
50  Using Arduino / Project Guidance / Re: Xbee networking help???? on: September 03, 2014, 11:15:12 am
Namely,How can i see SEPERATELY those 3 values in one xbee and connected arduino?

So 3 separate Arduinos are sending values to a single Arduino (over XBee)? In that case, you need some sort of identifier, like an address, to indicate whose value that is.
51  Using Arduino / Programming Questions / Re: working with Array (basic code but very strange) on: September 03, 2014, 11:09:47 am
Isn't all this a bit pointless in the small Arduino environment?

Why does the size of the Arduino environment matter? It all gets optimized to the same values anyway.

As the programmer you decide what size the array will be so why is there a need to use sizeof().

So I need to update as little as possible if I need to make changes. Using the above mentioned macro scales very well with multiple arrays, particularly if the size of any of those arrays could change often between code uploads.
52  Using Arduino / Programming Questions / Re: working with Array (basic code but very strange) on: September 02, 2014, 01:55:11 pm
Code:
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))

So if you had the following declared:

Code:
int myArray[10];

The following would return 10:

Code:
ARRAY_SIZE(myArray)
53  Using Arduino / Programming Questions / Re: IPAddress from Keypad on: September 02, 2014, 11:30:18 am
I think you're missing some code around line 42.
54  Using Arduino / Programming Questions / Re: Button mode not functioning as expected on: August 29, 2014, 06:42:46 pm
Edit* I guess it would actually be a 2550ms delay per color.

2550 mS times 2 loops per function call times 3 function calls means  15 seconds per cycle.

meaning I'd have to catch it at exactly the right time when the violet  fade function ends and the red fade function starts

You would have to push the switch down during one cycle, release it during the second, and wait for the cycle to finish.

I have no idea how to make this work.

It isn't trivial. It will require state machine, and liberal use of millis() to create non-blocking code that will properly adjust the fade values.
55  Using Arduino / Programming Questions / Re: Button mode not functioning as expected on: August 29, 2014, 05:00:02 pm
If I push again it does not reset back to 0 as I would expect.
Because it's most likely stuck in one of the delay() calls you make in the cycle functions, and it's not reading switch state information when it's twiddling its thumbs.

Quote
Secondly, after I push the button once it seems to immediately change to mode 2 instead of mode 1 (from 0).

Sounds like a bouncy switch.
56  Using Arduino / Programming Questions / Re: Help Needed with programming to recieve data in API mode through XBEE. on: August 25, 2014, 05:06:30 pm
Since italics styled code isn't typically a feature of the Arduino programming environment, perhaps you should have started here:

How to use this forum - please read.
57  Using Arduino / Programming Questions / Re: debouncing pushbutton, so frustrating on: August 22, 2014, 06:44:29 pm
Code:
buttonState = digitalRead(dateButtonPin);
  if (buttonState != lastButtonState)
    {
    if (buttonState == HIGH && millis() - lastEvent >= interval)
      {
        x=1;
        lastEvent = millis();
      }
      lastButtonState=buttonState; 
      if(millis() - lastEvent >= interval)
      {
        displayDate();
      }       
    }

displayDate() isn't conditional upon either edge. Because the positive edge resets the debounce time, displayDate() won't be fired on the positive edge. It will, however, be fired on the negative edge.

You need to have it enter the loop on the positive edge, and only exit the while loop if you detect another positive edge.
58  Using Arduino / Programming Questions / Re: Need help with code for WEATHER SESTEM on: August 22, 2014, 11:54:21 am
Is it possible that the ide is not recognizing the library installed?

Only if it's not installed correctly or you haven't restarted the IDE since it was correctly installed.
59  Using Arduino / Programming Questions / Re: Need help with code for WEATHER SESTEM on: August 22, 2014, 11:11:12 am
'dht11' does not name a type"

To reiterate what PaulS said, this typically means you didn't install the library correctly, or you didn't restart the Arduino IDE since installing the library.
60  Community / Gigs and Collaborations / Re: Arduino Development person wanted. on: August 21, 2014, 10:54:52 am
Quote
Hi I am interested in reproducing

Have you tried contacting the author to see if he has any schematics? It looks like he posted the code for it...
Pages: 1 2 3 [4] 5 6 ... 230