Show Posts
Pages: 1 [2] 3 4 ... 94
16  Using Arduino / Programming Questions / Re: const int / int on: July 23, 2014, 09:27:07 am
I disagree, econjack. A string constant has a type of "array of characters" and so decays to a pointer to its first element when used as in AWOL's example.
17  Using Arduino / Programming Questions / Re: const int / int on: July 23, 2014, 08:52:36 am
Hah! Thanks for the analogy.

But using a pointer with a const int is probably pretty rare, and actually points out another difference between a const and #define.
18  Using Arduino / Programming Questions / Re: const int / int on: July 23, 2014, 08:33:55 am
FlyingAngel:
You are wrong.

const ints don't use RAM.
19  Using Arduino / Project Guidance / Re: How to change volume of sound on: July 22, 2014, 03:00:16 pm
You are missing a piece, Crossroads. The digital pot should be hooked up to this:
https://www.sparkfun.com/products/11044
20  Using Arduino / Programming Questions / Re: Problem with the Serial.read() command on: July 22, 2014, 09:20:53 am
Is your LED really on pin 12? Usually they are on pin 13.
21  Using Arduino / Programming Questions / Re: Clock Program Stopped on: July 21, 2014, 06:02:21 pm
....And where any memory leaks might be.
22  Using Arduino / Programming Questions / Re: EEPROM ovf error when reading GPS data on: July 21, 2014, 06:01:08 pm
Assuming that the address in the EEPROM is by byte, you need to add 4 to address each time. When you use real pointers, C and C++ automagically increments by the size of the object.

Personally, I would write only bytes and use a union to break the float apart, but that is just me.
23  Using Arduino / Programming Questions / Re: EEPROM ovf error when reading GPS data on: July 21, 2014, 05:35:08 pm
The problem might be with address. If it is a straight char pointer, it might be incrementing by 1 byte instead of the desired 4 bytes.
24  Using Arduino / Project Guidance / Re: Digital Pin Commands on: July 21, 2014, 04:07:31 pm
The BlinkWithoutDelay example will do this.
25  Using Arduino / Programming Questions / Re: Unexpected pow() behaviour on: July 21, 2014, 01:54:49 pm
Also good for converting watts to dBm's and other logarithmic functions.
26  Using Arduino / Programming Questions / Re: First steps debugging on: July 21, 2014, 01:51:50 pm
Debugging on the Arduino is done old school. Judiciously inserted print statements.
27  Using Arduino / Project Guidance / Re: frog detector on: July 17, 2014, 01:05:53 pm
Hook up a garage door opener to run a sweeper across the driveway to sweep the frogs out of the way.
28  Using Arduino / Project Guidance / Re: change the auto-shutdown time on: July 17, 2014, 10:12:18 am
What prevents an auto-shutdown? Is there some innocuous button ("Refresh Display") that you press to keep it going? You might be able to program an arduino to activate a relay every 12 seconds or so to keep it alive.
29  Using Arduino / General Electronics / Re: Why do we need additional resistor between digital input/pushbutton and GND? on: July 17, 2014, 09:50:59 am
You need the resistor because an input on the Arduino that is not connected to anything can "float", and end up at almost any voltage - and randomly read either HIGH or LOW. The resistor "pulls down" the pin to ground to keep it in the LOW state until you push the button to set it at a HIGH state.
30  Using Arduino / General Electronics / Re: Are residential customers billed for Real or Apparent Power ? on: July 17, 2014, 09:22:51 am
Oops, I did not catch the voltage divider effect of the 2.2 uF. I stand corrected.
Pages: 1 [2] 3 4 ... 94