Show Posts
Pages: [1] 2 3 ... 226
1  Using Arduino / Programming Questions / Re: working with Array (basic code but very strange) on: Today at 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)
2  Using Arduino / Programming Questions / Re: IPAddress from Keypad on: Today at 11:30:18 am
I think you're missing some code around line 42.
3  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.
4  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.
5  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.
6  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.
7  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.
8  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.
9  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...
10  Using Arduino / Project Guidance / Re: I'm really new at this I need some help on: August 17, 2014, 02:24:24 pm
Is it dangerous or not?

Of course it's dangerous. Not knowing exactly what you are doing can get you killed at these voltage levels.
11  Using Arduino / Programming Questions / Re: Sending data from arduino to processing on: August 17, 2014, 10:25:30 am
There is a question.

Not a question, but I'm not going to quibble over semantics.

Quote
How can I receive channel value data from arduino?

Create a protocol. Typically this involves a start packet marker, end packet marker, and delimiters. On the receiving end, read the data, and parse the values out. You can change "ec" and "ev" to single letters and use a state machine.
12  Using Arduino / Programming Questions / Re: Birghtness value on LED from Serial on: August 17, 2014, 09:46:18 am
Quote
Pretty sure I read some where just to subtract 49? Or probably 48....

Or you can subtract '0', and not have to keep an ASCII table on standby whenever you work on the code.
This works great! Thanks. One question: There is a short delay on like 0.5-1 second before the value I send to the monitor is printed and the LED reacts. Can this delay be removed somehow?

Send a non-numeric value, letting parseInt() know that you're done sending the number.
13  Using Arduino / Programming Questions / Re: Birghtness value on LED from Serial on: August 17, 2014, 09:45:20 am
This works great! Thanks. One question: There is a short delay on like 0.5-1 second before the value I send to the monitor is printed and the LED reacts. Can this delay be removed somehow?

Send a non-numeric value, letting parseInt() know that you're done sending the number.
14  Using Arduino / Programming Questions / Re: Sending data from arduino to processing on: August 17, 2014, 09:42:54 am
I want to send dmx data (channel and channel value) from arduino to processing.

Ok, you have our permission.

Is there a question here? If you're having trouble, you're going to actually describe the problem you're having.
15  Community / Gigs and Collaborations / Re: PCB design support wanted on: August 15, 2014, 01:25:28 pm
Do you have the battery and sensors already picked out? If so it would probably help to post the links so that people can gauge the viability of running the system for what I'm calculating to be around 4500 hours on a single charge.
Pages: [1] 2 3 ... 226