Arduino to Arduino talk without Rx Tx

I like to send a once a second string from Arduino A (Tx) to Arduino B (Rx) without using the serial pins. Arduino A is too busy doing a very accurate frequency count for me, Arduino B needs to be able to receive such calculate frequency once a second.

Reason I don't want to use Rx and Tx is that I will need the Rx pin on Arduino B to load a calibration coefficient later on.

Now...I can easily solve this issue with a "programing switch" on my design, but I like to see a alternative first.

The string is rather small...example:

5680.61
5680.66

Software serial ?

http://arduiniana.org/libraries/newsoftserial/

This is the way it started off...

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1273526282

What happens now is that Arduino A takes 3000 of a 5.6 K signal samples before decoding it and it prints this info once a second. I found 3000 to be the most accurate and best sampling rate possible without issues, but I can't use this Arduino to do anything else if I dedicated it like I like too. This is OK

Arduino B will be doing some calculations for me, all Arduino B needs is the string mentioned which Arduino A already can export.

Pluggy's suggestion if goo. Use NewSoftSerial on both Arduinos. On the one calculating the frequency, dedicate 2 digital pins for serial communication. Tell NewSoftwareSerial about the pins, and use NewSoftSerial::rrint to send the data to the software serial port.

Connect 2 wires (and the grounds) between those 2 pins, and 2 digital pins on the 2nd Arduino. Tell NewSoftSerial about the pins the wires are connected to. Don't forget that TX on one is RX on the other.

Use NewSoftSerial::available and NewSoftSerial::read to get the data.

Thank you for the suggestions, NewSoftSerial worked very well and it is very easy to use as well.

My problem now lies on doing some math on the received data:

#include <NewSoftSerial.h>
NewSoftSerial mySerial(2, 3);
float soundSpeed = 0;
float D1Value = 67.2;
float E1Value = 3.5;
boolean frqReceived = false;
char frq[10];
int frqIndex = 0;

void setup() {
  Serial.begin(9600);
  mySerial.begin(9600);
}
void loop() {

   while(mySerial.available() >0)
  {
    char bChar = mySerial.read();
    if (frqReceived)
    {
      frq[frqIndex] = bChar;
      frqIndex++;
      frq[frqIndex] = '\0';
    }
    else if (bChar == '

My desired result for soundSpeed should look something like this:

1491.14

But I can't compile this, I get the error:

error:invalid operands of types 'char[10]' and 'int' to binary 'operator/'

I suspect it might have to do with the Array being of type char which I dunno how to get around this.

)
   {
     frqIndex = 0;
     frqReceived = true;
     frqIndex++;
     frq[frqIndex] = '\0';
   }
   if (frqIndex >= 8)
   {
     frqIndex = 0;
     frqReceived = false;
     soundSpeed = (((frq/256)*D1Value)- E1Value);
     Serial.println(frq);
     Serial.println(soundSpeed);
   }
 }


My desired result for soundSpeed should look something like this:

1491.14 

But I can't compile this, I get the error:

§DISCOURSE_HOISTED_CODE_1§


I suspect it might have to do with the Array being of type char which I dunno how to get around this.

Its this line I bet:

soundSpeed = (((frq/256)*D1Value)- E1Value);

You need to find the average value of all the values in your frq array; you cant just use it the way you are.

So how to I access my frq Array so that I can use it as a numbers?

soundSpeed = (((frq/256)*D1Value)- E1Value);

This line is indeed the problem line. frq contains a string representation of a number, not a number. Use the atoi function to convert the string representation of the number to the number, first. Then, use the number in place of frq in this statement.

Thanks you for pointing out my mistake and also for the pointer to atoi. While reading on atoi I found that atof would do decimal like I needed it too.

Now it looks like this:

double frqValue = atof(frq);
soundSpeed = (((frqValue/256)*D1Value)- E1Value);

Works Great! You guys rock!