Show Posts
Pages: 1 2 [3] 4 5 ... 224
31  Using Arduino / Project Guidance / Re: Help understanding timers (delay or millis)? on: July 16, 2014, 11:14:34 am
millis() can handle all of this. StateChangeDetection example shows you how to look for a signal edge, as in, you want to know when the float switch goes from LOW to HIGH. You can then use millis to get the current time, and turn on the pump. Outside of those conditions, you can check to see if has been 20 seconds since you recorded the time, and turn the pump off if that's the case.
32  Using Arduino / Programming Questions / Re: How to extract data from arduino? on: July 16, 2014, 11:02:03 am
I´m developing a project, which, it is a sensor that sends the data through a wireless network with xbee boards. The problem is that, I want to receive the data from the sensor in a computer and use these data for other purposes. Another problem is that, it should do it in a real time, so in this case a data logger is not useful.

Why are those problems? If you're sending sensor data over an XBee, and you want to log it real-time on the computer, then you need to connect the XBee to the computer, and use some sort of program to write the incoming serial data to a file, presumably with a time stamp.
33  Using Arduino / Programming Questions / Re: pinMode or digitalWrite firrst.... on: July 16, 2014, 10:34:39 am
Why not try both options and see for yourself?
34  Using Arduino / Programming Questions / Re: limit on arays? on: July 14, 2014, 11:36:57 pm
  unsigned long timelog[1000];
  int datalog[1000];

6000 Bytes of RAM.

Uno has 2000 available. Yeah... not going to work.
35  Using Arduino / Programming Questions / Re: Hello Arduino on: July 13, 2014, 06:30:28 pm returns a character, it doesn't return true/false, so you don't pass it a value to check it against, you check if the return value equals a constant.
36  Using Arduino / Programming Questions / Re: Mod-12 counter and 4 to 16 decoder on: July 13, 2014, 11:59:54 am
not asking for the code but juz wanna understand how to do it, like what arrch had said above

So try it. If it doesn't work, post what you have here, with code tags, and explain both what it is doing (be specific) and what you are expecting it to do (again, be specific).
37  Using Arduino / Programming Questions / Re: Arduino Relay Ethernet Shield on: July 13, 2014, 11:39:38 am
It's unclear from your post if you're having an issue. If you are, post the issue you are having. If not, "Cool."
38  Using Arduino / Programming Questions / Re: Mod-12 counter and 4 to 16 decoder on: July 13, 2014, 09:23:16 am
I not sure how to write the code for that

That's the case with most projects, you have to figure it out. I'm sure you homework assignment didn't include having someone write the code for you.
39  Using Arduino / Programming Questions / Re: Mod-12 counter and 4 to 16 decoder on: July 13, 2014, 08:53:45 am
At this point, I don't see the purpose of the Arduino, but if you're hell bent on having it there your sketch just needs to to a pinMode on 8 pins, half being input, half being output, and every pass through the loop, digitalWrite an ouput pin to the result of a digitalRead of another.
40  Using Arduino / Programming Questions / Re: Simple program fails to decrement variable on: July 13, 2014, 12:00:55 am
superString needs to be bigger if you want to store 8 characters in it, since you need a spot for the null terminator.
41  Using Arduino / Programming Questions / Re: Trying to get single button to start / stop a show - non-blocking on: July 12, 2014, 10:27:37 pm
Unless you plan on holding the button down for the full 2 minutes, you should only be checking for one edge, either falling or rising, not both.
42  Using Arduino / Programming Questions / Re: Converting one array to both string and variable assignment on: July 12, 2014, 10:21:35 pm
Array of structs
43  Using Arduino / Programming Questions / Re: Binary String to base ten int on: July 12, 2014, 06:27:39 pm
Convert it to a char array, and calculate it yourself.

{ '0',  '1', '0', '0', '1', '1, '0', '0', '\0'}

Subtract '0' from each element to get the decimal value. Start with a total of 0, and loop through each element, adding the decimal value for the element to your total. Left shift the total by 1 before moving to the next element.

sscanf() might also work.
44  Using Arduino / Programming Questions / Re: Understanding on: July 12, 2014, 06:14:43 pm
I'm sure it has something to do with the type of variable the now() function returns

It returns a time_t variable, which is unsigned.
45  Using Arduino / Programming Questions / Re: Void Setup on: July 12, 2014, 04:53:43 pm
The questions you're asking can't be answered without raising more questions and confusion, given your level of knowledge. You should look at understanding what a function is, how they're used, their purpose, etc.
Pages: 1 2 [3] 4 5 ... 224