Show Posts
Pages: [1] 2 3 ... 226
1  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.
2  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.
3  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.
4  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.
5  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...
6  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.
7  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.
8  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.
9  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.
10  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.
11  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.
12  Using Arduino / Programming Questions / Re: sending a word on: August 15, 2014, 10:39:56 am
Arduino can only read one character at a time, so you need an array that can store the characters as they come in:

Code:
char myBuffer[10+1]; // Can receive 10 characters plus the null terminator

You also need a variable that keeps track of where in the array the next available slot is:

Code:
int myIndex = 0;

Every time you read a byte:

Code:
inByte = Serial.read();

You check if it matches a terminating character. This can be anything of your choosing, but a common tactic is to have the serial monitor send a newline, and use that:

Code:
if (inByte == '\n')

If this is true, then you can use strcmp() to see if it matches your string:

Code:
if (strcmp(myBuffer, "Red") == 0)

And take the action accordingly. You should also clear the buffer:

Code:
myBuffer[0] = '\0';
myIndex = 0;

If it does not match the new line character, you stick it into the buffer, increment the index and null terminate the array (required for use with string functions like strcmp()):

Code:
myBuffer[myIndex] = inByte; // put byte in buffer
myIndex++; // move to next index
myBuffer[myIndex] = '\0'; // and null terminate the array
13  Using Arduino / Programming Questions / Re: problem with string compare on: July 29, 2014, 06:48:28 pm
What are you mixing Strings and strings? Pick one, and stick with it.
14  Using Arduino / Programming Questions / Re: problem with string compare on: July 29, 2014, 06:44:20 pm
You can edit your post, you don't have to post a new reply if you need to fix something.
15  Using Arduino / Programming Questions / Re: Push Button Millis Timer Delay on: July 29, 2014, 06:43:38 pm
I feel like I just answered this question:

http://forum.arduino.cc/index.php?topic=257861.msg1822683#msg1822683
Pages: [1] 2 3 ... 226