Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 226
61  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.
62  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 (http://www.digitalsmarties.net/products/jeenode) which strips the microcontroller to the bare essentials and adds an RF transciever. The Moteduino (http://lowpowerlab.com/blog/2012/12/20/moteino-the-wireless-low-power-low-cost-arduino-clone/) 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.
63  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.
64  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.
65  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?
66  Using Arduino / Programming Questions / Re: limit on arays? on: July 14, 2014, 11:36:57 pm
Code:
  unsigned long timelog[1000];
  int datalog[1000];

6000 Bytes of RAM.

Uno has 2000 available. Yeah... not going to work.
67  Using Arduino / Programming Questions / Re: Hello Arduino on: July 13, 2014, 06:30:28 pm
Serial.read() 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.
68  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).
69  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."
70  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.
71  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.
72  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.
73  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.
74  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
75  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.

Code:
{ '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.
Pages: 1 ... 3 4 [5] 6 7 ... 226