Show Posts
|
|
Pages: 1 ... 64 65 [66]
|
|
977
|
Forum 2005-2010 (read only) / Frequently-Asked Questions / ON and OFF (and sleep?)
|
on: September 19, 2008, 09:57:58 pm
|
|
Hi all!
I'm working on a self-contained project that will be battery powered. I want it to come "on" when the user presses a pushbutton, but then turn "off" again after, say, 10 minutes of inactivity.
This device must be very power conservative, because it won't be very feasible to swap out the 9V battery. So what I really want is for the Arduino inside to physically turn itself OFF (and not just enter a quiescent state which appears "off" to the external world).
Being a software guy, I'm having some difficulty envisioning what kind of circuit would allow me to (a) switch "on" the Arduino at the push of a (momentary contact) pushbutton (b) switch it back "off" in response to a digitalWrite to one of the pins (after the 10 minute timer lapses) (I don't need any advice on how to write the software.)
Any suggestions to get me started?
[As an addendum, I read somewhere in a recent post that you can put the Arduino into a sleep state. Does anyone know how to calculate how long you'd expect a 9V battery to provide adequate power for an asleep Arduino? If the answer to this question is favorable, I would probably opt to solve the on/off problem by simply putting the device to sleep rather than turn it completely off, since this wouldn't involve any fancy (by my standards) circuitry.]
Many thanks,
Mikal
|
|
|
|
|
978
|
Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: what is a problem??
|
on: September 16, 2008, 10:49:44 pm
|
What exactly is connected to the Arduino serial port? Is it the GPS or the computer? The fact that you are connecting at 4800 baud suggests the former, but then I don't see how you can Serial.print(). Or is the GPS data coming through the computer? If so, make sure your monitor is also set to 4800 baud. The kind of garbage you report is typical with mismatched baud rates. I would also suggest replacing byteGPS=Serial.read(); // Read a byte of the serial port if (byteGPS == -1) { // See if the port is empty yet delay(100); } else { with if (Serial.available()) { byteGPS = Serial.read(); During that 100ms delay, up to (4800/9)/10 ~= 53 bytes may arrive and be lost! You may also need to remove other delays in your loop, like that massive bunch of calls to Serial.print(). Parsing a GPS stream at full speed on the little Atmel processor is not a trivial task, but others are doing it. Mikal
|
|
|
|
|
979
|
Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Serial protocol how-to
|
on: September 15, 2008, 12:20:10 pm
|
First of all, it's good to see both Big and Grumpy in the same thread.  I've been thinking about how the Arduino HardwareSerial class is pretty good for formatted text, but it would be nice to extend it for binary data. Wouldn't it be useful to include, in addition to the print* suite of functions, something like: void HardwareSerial::writebuf(byte *buffer, int bufsize); void HardwareSerial::readbuf(byte *buffer, int *bufsize);
// sample usage: byte buf[64]; Serial.writebuf(buf, sizeof(buf));
int size = sizeof(buf); Serial.readbuf(buf, &size); For the readbuf method, you would send the maximum size in and then the actual size would be returned. Doesn't this seem like it would useful? I would be happy to contribute to the implementation, along the lines of the discussion above. Mikal
|
|
|
|
|
985
|
Forum 2005-2010 (read only) / Bar Sport / Re: Arduino board hierarchy
|
on: December 06, 2008, 10:54:30 pm
|
@mem, I'm not sure company policy permits me to divulge the name in a public forum, but let's just say I'm a software engineer working for a chip manufacturer. A large one. The LARGEST one, in fact.  Fred and I work in the networking division. @macegr, I appreciate your assessment. It's a real pleasure to be in this forum with all "the good people". Sometimes I think I spend a little too much time here -- time I could be developing Arduino projects, or working! @Fred, please post a reply if/when you start using the forum, so that I can better assess what to do next.  Cheers and thanks, Mikal
|
|
|
|
|
986
|
Forum 2005-2010 (read only) / Bar Sport / Arduino board hierarchy
|
on: December 06, 2008, 01:05:12 am
|
With this post, I reached the coveted "God Member" status! Woo hoo!  I have some mixed feelings, though: why do I have to trade my 4 gold stars for 5 silver ones?  After several months of talking up Arduino to my team at work, I finally got one of them -- my boss, no less -- hooked. He bought a bunch of *duino loot from several of the big suppliers, and now we spend quite a bit of time in our one-on-one meetings talking about all the projects we're going to build someday. I realized suddenly that if he starts reading these forums, he'll see how much of my work time I spend posting. I'm busted! Fred, are you reading this? If I seem to have disappeared from the forum, it's probably just that I have had to create a new, more opaque, user identity. See you around! Mikal
|
|
|
|
|
988
|
Forum 2005-2010 (read only) / Bar Sport / Re: New Board - Nice!
|
on: September 16, 2008, 01:23:00 pm
|
|
Grumpy_Mike,
At 1:21PM US Central Daylight Time on 16 September, you were listed as "offline". My guess is that you are considered "online" only as long as you have an active HTTP session. I think 20 minutes is the default.
M
|
|
|
|
|
989
|
Forum 2005-2010 (read only) / Bar Sport / Re: New Board - Nice!
|
on: September 15, 2008, 09:05:19 pm
|
|
And thanks for returning to the yellow checkmark motif for "new posts". The slightly flashing bullets were hard for my poor old eyes to see. :o
Mikal
EDIT: I may have jumped the gun. It looks like the flashing bullets are back. Ah well!
|
|
|
|
|