Loading...
  Show Posts
Pages: 1 2 3 [4]
46  Using Arduino / Programming Questions / Re: Timed Events on: June 30, 2011, 06:07:35 pm
You might want to look at (and possibly adapt) one of the libraries. Here's a useful one:

http://arduino.cc/playground/Code/TimedAction

47  Using Arduino / Programming Questions / Re: Using new to create a pointer on: June 28, 2011, 07:42:32 pm
The Arduino memory map looks like this:

top of memory
stack (grows down v)
...
heap (grows up ^)
uninitialized variables
initialized variables
bottom of memory (0x00000000)

So - if you want it on the heap, you have to malloc (or define new() yourself). If you're writing a library, sometimes this is the only choice, but often a bad choice for beginning programmers who aren't used to fragmentation and memory leaks.

If you're just writing a program, putting the new instance in either a global, or better yet, a static accessed with a function will put the variable in low memory. Then the heap grows on top of that, while the stack starts at high memory and works its way down.

Just remember that life gets bad when the heap meets the stack.  smiley
48  Using Arduino / Programming Questions / Re: Using new to create a pointer on: June 28, 2011, 07:18:24 pm
new() and delete() are undefined on Arduino.

Here's an article with more details:
http://arduinoetcetera.blogspot.com/2010/04/implementing-new-and-delete-c.html

That article also has a replacement new() and delete() that you can use.
49  Using Arduino / Project Guidance / Re: Hamradio and APRS mobile tracking with gps on: June 17, 2011, 05:59:42 pm
I don't think the Arduino has enough processing power to decode AX.25 from a radio directly. You'd need to sample high-resolution sound, store it, then translate that into AX.25 - all in 2k of RAM and a 16MHz processor. That would be almost impossible.

You'll need something to turn the AX.25 into serial data before it gets to the Arduino.
50  Using Arduino / Project Guidance / Re: Turn on Desktop PC with wireless Arduino on: June 17, 2011, 05:43:53 pm
If you're just doing a one-off, have you thought about a power switch tail (http://www.adafruit.com/products/268 , http://www.sparkfun.com/products/9842) ? Combining that with a BIOS setting to "turn on when power is restored" (aka AC Power Loss Restart: enabled) might be all you need.

(I've been thinking about a watchdog for one of my machines using the power switch tail - but haven't got 'round to it yet.)
51  Using Arduino / General Electronics / Re: Re-flash the ATMEGA8U2 on: June 17, 2011, 03:27:42 pm
If you've got Windows, here are a couple of useful links:

http://arduino.cc/en/Hacking/DFUProgramming8U2
http://andrewmemory.wordpress.com/2011/04/14/upgrading-the-arduino-uno-8u2-using-flip/
52  Using Arduino / Project Guidance / Re: Hamradio and APRS mobile tracking with gps on: June 17, 2011, 03:16:06 pm
If you have a Baycom modem that outputs serial, and a GPS that inputs serial, it shouldn't be hard (famous last words) to get them talking to each other through an Arduino. You'd need to use software serial for at least one of them, and probably the hardware serial for the other - probably hardware serial for the Baycom since you don't know when signals will come in.

If you have a USB Baycom modem, that's significantly harder.
53  Using Arduino / Programming Questions / Re: Mood lamp program is reseting on: June 13, 2011, 06:42:47 pm
It *shouldn't* make a difference, but you might want to change the variable name in your for loop to something other than a global:

Code:
for(int i=0; i<=2; i++)
         digitalWrite(arr[i], LOW);

Also, are you sure it's resetting? What happens if it's just changing i or c to a value you don't expect? You might want to test i>=9 instead of i==9, etc.

You might put a Serial.println() at the top of the loop and the bottom of the setup() just so you can tell what's happening.

If all the code checks out, then think about the power being consumed - most LEDs aren't a problem, but if you're driving enough of them you might be taking the Arduino below what it needs to stay alive. (You could test this by disconnecting your LEDs and putting serial port debugging statements in.)
54  Community / Website and Forum / Error page has wrong forum link on: June 12, 2011, 04:11:58 am
The 404 error page (eg www.arduino.cc/thispagedoesnotexist) has a Forum link to http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl instead of http://arduino.cc/forum.
55  Using Arduino / Installation & Troubleshooting / Re: Possible software conflicts on: June 12, 2011, 03:49:46 am
All the Arduino files live under a single directory (there are no Arduino files in WINDOWS or other common directories) as far as I know. So there shouldn't be any compatibility issues - in fact, you can even have different versions of the Arduino files installed at the same time.
56  Using Arduino / Programming Questions / Re: If trigger statement not working on Uno board on: June 08, 2011, 07:00:38 pm
Just a guess: you might want a pinMode(co2Pin, OUTPUT) in your startup.
57  Using Arduino / Microcontrollers / Re: ardweeney power ? on: May 26, 2011, 02:47:37 pm
Ardweeny has a "backpack" to power off 9v:

http://www.solarbotics.com/products/kardwbp/

but if that's all you want to do, a 7805 and a couple of capacitors are all you need:

http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard
58  Using Arduino / Installation & Troubleshooting / Re: ATMEGA 328P problem on: May 26, 2011, 02:27:17 pm
I'm not sure what a reset LED is - according to the Boarduino website, the pin 13 LED is the red one (closest to the 328). Perhaps your 328 just has the blink sketch already loaded? A lot of them come that way.
59  General Category / General Discussion / Re: What Board to Buy? on: May 19, 2011, 05:47:15 pm
I'd advise you to get a DIP version of whatever board you buy, not a surface mount version. That way, if you fry your 328, you can install another one (rather than pitching the whole board).
60  Using Arduino / Programming Questions / Re: DmxSimple and Ps2 libraries on: May 19, 2011, 05:36:38 pm
A quick look at the DmxSimple library reveals it uses TIMER2 - which is pin3. PS2mouse doesn't appear to use any interrupts.

You might want to pick different pins for your PS2 connections, and use pin3 for DmxSimple.
Pages: 1 2 3 [4]