Show Posts
Pages: 1 ... 30 31 [32] 33 34 ... 105
466  Using Arduino / Project Guidance / Re: DTMF Reciever not working on: September 16, 2013, 08:00:51 pm
Quote
I also noticed the "OF" line
That is actually OE (Output Enable). The datasheet indicates that it is pulled HIGH internally so you don't need to connect it.
I don't see any capacitors at the top right of the diagram. There are two fuses and a varistor. The two capacitors at top left just smooth transients and switching noise on the power supply.

Exactly what frequency of crystal did you get? If it isn't the right one the decoder won't work.

Pete
467  Using Arduino / Project Guidance / Re: DTMF Reciever not working on: September 16, 2013, 07:05:40 pm
Quote
I noticed that I am left with "DV" not connecting anywhere on the Arduino
DV (Data Valid) must be connected to Arduino pin2. The pin is called INT_PIN in the code but you couldn't find any other reference to it because it is "hidden" in the attachInterrupt statement in case 'l'  in the loop function. Pin 2 is interrupt zero.
That should get the receiver working.

Pete
468  Using Arduino / Programming Questions / Re: Time and if statement on: September 11, 2013, 05:39:27 pm
Which arduino are you using?

Pete
469  Using Arduino / Programming Questions / Re: Time and if statement on: September 11, 2013, 04:29:15 pm
Quote
Thank you. I will take this on board.
But did you try it?

Pete
470  Using Arduino / Programming Questions / Re: Time and if statement on: September 11, 2013, 01:49:16 pm
Two problems.
timeMsg is declared to be local to the getFormattedTime function and therefore doesn't exist as soon as you return from it. So you are passing a pointer to a non-existant string. Declare timeMsg globally and that will fix one problem.

Second problem is using the String class. It is not a good idea to use it on a processor that has very little static ram, like 328-based Arduinos.

Pete
471  Using Arduino / Programming Questions / Re: Arduino 0022 compile error on: September 10, 2013, 08:22:16 pm
You appear to be trying to compile a normal C/C++ program which has a main() function. Arduino programs aren't structured that way. They do not have a main() function but they must have setup() and loop() functions.

And version 0022 is very old. The most recent one is 1.0.5 and you should upgrade to that before you do anything else.

Pete
472  Using Arduino / Sensors / Re: Problems reading Dallas D18B20 onewire temp sensor... on: September 08, 2013, 10:23:10 pm
Read this and fix up your code: How to post code properly

Pete
473  Using Arduino / Programming Questions / Re: Avr Internal Temp sensor, Floating Point vs Integer math on: September 05, 2013, 10:02:54 pm
Yup :-)

Pete
474  Using Arduino / Programming Questions / Re: Avr Internal Temp sensor, Floating Point vs Integer math on: September 05, 2013, 08:34:45 pm
Quote
It does have three fractional multiply instructions but it is not a full floating point unit.
It does not have a floating point unit at all. Floating point implies that the number contains an exponent and those three instructions (described in detail in the instruction manual) do not handle exponents.

Pete
475  Using Arduino / Programming Questions / Re: Arduino Boolean OR on: September 05, 2013, 02:06:47 pm
It's inclusive (standard).

Pete
476  Using Arduino / Networking, Protocols, and Devices / Re: initialize multiple i2c slaves with the same address on: September 05, 2013, 10:16:33 am
I would try the software described in the link Headroom gave. A multiplexer will probably be just as complicated as trying the software I2C library.
You could use the software I2C library to set the addresses of each device. If the library works, this would be a one-time thing. Then use the regular I2C library (which uses the hardware I2C) for normal use of the chips.


Pete
477  Using Arduino / Programming Questions / Re: Decimal point in an array not recognised on: September 05, 2013, 09:44:17 am
If you have warnings turned on, this code:
Code:
float a = 0.5;

void setup(void)
{
  int b;
  Serial.begin(9600);
  b = a;
  Serial.print(b);
  if(b = 1) {
    Serial.println(b);
  }
}

void loop(void){}
produces this warning:
Code:
sketch_sep05a.ino: In function 'void setup()':
sketch_sep05a.ino:10: warning: suggest parentheses around assignment used as truth value
which at least hints that there's something wrong and if you understand that it is saying there is an "assignment" in the if statement, you might see that "=" isn't right.
But it doesn't warn about assigning a float to an int. I think the C language considers this valid. Perhaps the compiler has different levels of warning (like MSVC) and this one is lower than the preset warning level.

It is a really good idea to have warnings turned on and to investigate each one. There are some things that the compiler issues a warning for, which are almost always serious logical errors, especially those that involve pointers.

Pete
478  Using Arduino / Programming Questions / Re: Decimal point in an array not recognised on: September 05, 2013, 09:23:17 am
Code:
        channel=Freq[NameIndex][i];
Now that Freq is, presumably, a "float" this would work except that:
Code:
int channel;
you assign it to an integer variable.

I suspect that this isn't right either:
Code:
const int NUM_FREQS = sizeof Freq[0]/sizeof Freq[0][0];
I think the result of this will be 5 (haven't tried it) because Freq[0] is the first row in the array - not the whole array.
You probably need:
Code:
const int NUM_FREQS = sizeof Freq/sizeof Freq[0];

Pete
479  Using Arduino / Programming Questions / Re: help me with i2c on: September 04, 2013, 10:42:41 pm
Quote
will the RTC stop running when i get data from the temp sensor?
No.

Quote
is there some kind of interrupt that i need to know about?
Depends upon the type of RTC you use and whether you need to use an interrupt. Some RTCs have a one pulse per second output which can be wired to an interrupt on the arduino so that you get an interrupt each second. Some allow alarms to be set which can be wired to cause an interrupt every minute or every hour for example.
Whether the interrupt will even be useful to you depends upon what you are planning on doing.


Pete
480  Using Arduino / Programming Questions / Re: help me with i2c on: September 04, 2013, 09:00:12 pm
Read this How to post code properly and fix your code.

Pete
Pages: 1 ... 30 31 [32] 33 34 ... 105