Show Posts
Pages: 1 2 3 [4] 5 6 ... 225
46  Using Arduino / Programming Questions / Re: the input read only once, where the output will not change after the input chang on: July 17, 2014, 12:01:29 am
 if(digitalRead(Switch2) == HIGH)
  else if(digitalRead(Switch2)==HIGH && digitalRead (Switch3) == HIGH)

Unless the input of switch 2 goes from LOW to HIGH within the fraction of a microsecond that this if/else if combo runs, you're not going to hit that else if. else if means that the previous if failed. If the if statement failed, then it's very likely that the else if will also fail, because it holds the same condition.
47  Using Arduino / Programming Questions / Re: Can you set up multiple delays in your program? on: July 16, 2014, 11:55:57 pm
So you're trying to multitask. Blink Without Delay example demonstrates how this can be done.
48  Using Arduino / Project Guidance / Re: What's the best way to power arduino for long term remote use on: July 16, 2014, 12:24:14 pm
but I am guessing there are more efficient boards that can handle a moisture sensor and a wireless card.  Any thoughts would be appreciated. Thanks

You guessed correctly. You can do something like the JeeNode ( which strips the microcontroller to the bare essentials and adds an RF transciever. The Moteduino ( is very similar. You could even do a custom one with a smaller microcontroller, like an ATTiny84. That's what I did for a light sensor and I managed to get it to run for a couple months on a coincell battery, sending a light reading every 8 seconds.
49  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.
50  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.
51  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?
52  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.
53  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.
54  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).
55  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."
56  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.
57  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.
58  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.
59  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.
60  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
Pages: 1 2 3 [4] 5 6 ... 225