Show Posts
Pages: 1 2 [3] 4 5 ... 93
31  Using Arduino / Programming Questions / Re: Still a bit stuck with { }, return and exit. on: July 10, 2014, 09:02:16 am
No, it ends at the second brace. It's just recalled again by a for loop in a main function that you never see when you use the Arduino IDE.

yes, that's what I said, it loops

But that loop includes a function return and function call which will destroy all automatic variables and then recreate them. It is extremely misleading to consider that a "loop".
32  Using Arduino / Microcontrollers / Re: ATmega2560 is little endian or big endian? on: July 09, 2014, 03:41:57 pm
I wonder does PDP_ENDIAN derive from DEC PDP11 mini-computers. We had one in work with a HUGE 10MB drive.

More interestingly how can there be three types of endian-ness?

...R

Based on the code above, it appears that the long word has words with wierd endianness
Instead of 3,2,1,0 or 0,1,2,3 it goes 1,0,3,2.
33  Using Arduino / Programming Questions / Re: Attempt to use timers results in infinite loop in Setup() on: July 09, 2014, 03:32:30 pm
You have probably done something so bad that it immediately resets the machine after setup().

You don't have too much going on in the main loop so it will respond very quickly anyway.

My rule of programming is to make things as simple as possible (i.e., drop the explicit interrupts) and see if the main loop is fast enough to do what you want.
34  Using Arduino / Programming Questions / Re: funny characters in serial display on: July 09, 2014, 02:46:46 pm
You are printing the *address* of character not what it contains. Drop the & in both places.
35  Using Arduino / Programming Questions / Re: Attempt to use timers results in infinite loop in Setup() on: July 09, 2014, 01:16:36 pm
Why do you think the infinite loop is in setup()?

Also, you should not use print statements in interrupt routines. Set a flag and print from the main routine.
Also, talking to the dac in an ISR may be problematic since the communication may be interrupt based.o
36  Using Arduino / Project Guidance / Re: Arduino gps tracker on: July 09, 2014, 12:02:34 pm
The $GPRMC sentence, if available from your GPS, will give you velocity and heading data. Just check this for some significant non-zero number. Careful, though, drift might give you a small, non-zero velocity so you can't just check for zero.
37  Using Arduino / Programming Questions / Re: Quick question from a n00b; Can HIGH | LOW be reliably assigned? on: July 09, 2014, 11:58:37 am
ARe you talking about LOW the predefined variable or LOW in the sense of output voltage? It is unclear just what you are asking.
38  Using Arduino / General Electronics / Re: Confused about speaker and mono amp on: July 09, 2014, 11:24:34 am
Not easily.
39  Using Arduino / General Electronics / Re: Confused about speaker and mono amp on: July 09, 2014, 10:46:30 am
Yes, because it actually has a differential input.
40  Using Arduino / General Electronics / Re: Confused about speaker and mono amp on: July 09, 2014, 09:20:52 am
Yes, but again, you make no mention of hooking up the PWR to 5 V. Does the Power LED light up? Make sure you don't bridge the shutdown pin.
41  Using Arduino / General Electronics / Re: Confused about speaker and mono amp on: July 09, 2014, 08:56:25 am
I used that board and hooked it up directly to the arduino. Tone() works fine to play music. At least the star-wars theme. 8^)

You seem to have it hooked up exactly as I did. You do need to hook up the voltage supply too, you did not mention that.
42  Using Arduino / Programming Questions / Re: Convert voltage to dB on: July 08, 2014, 11:35:06 am
Is your sensor just a microphone? If so, you cannot just convert any single value to dB, you need to know the amplitude of your signal, and possibly filter it for A-weighting if this is for an SPL meter.
43  Using Arduino / Audio / Re: MSGEQ7 Noise problem on: July 08, 2014, 10:54:12 am
Since we cannot see how your circuit is hooked up, there is no way to tell.
Where is this LED? Where is the speaker?
44  Using Arduino / Programming Questions / Re: Issues with visual micro debugger on: July 08, 2014, 10:42:26 am
I think it is safe to say that most of us just use the serial print method of debugging.
45  Using Arduino / General Electronics / Re: Connect L298N to arduino on: July 08, 2014, 10:33:40 am
Your software.
Pages: 1 2 [3] 4 5 ... 93