Microphone input to Arduino mega 2560, code for binary out for FSK moduation

I am doing project on acoustic communication. Two arduino mega 2560 modules are considered. Input is audio. First I have to develop transmitter with FSK modulator. Using 555 timer I have developed modulator by considering squre wave (101010...) from function generator at 40kHz and 60kHz for bits 0 and 1 respectively. Now the problem is to get the binary data from audio input to microphone.

I have connected microphone module to arduino. But don't know how to get binary data at the serial port so that I can connect it to FSK modulator.

Please help me in this regard.

Your description is very muddled, you seem to mix up input and output all the time.

Now the problem is to get the binary data from audio input to microphone.

That simply does not make sense.
What are you trying to do?
You probably should not be trying to connect anything to the serial port but who knows.

Can you explain it again, maybe with pictures.

You probably should not be trying to connect anything to the serial port but who knows.

2V dc voltage is applied using potentiometer to arduino mega 2560. In serial monitor we observed a number in the range 0-255. We can also observe binary equivalent in serial monitor.

Now where to connect CRO probe to observe binary waveform

2V dc voltage is applied using potentiometer to arduino mega 2560. In serial monitor we observed a number in the range 0-255.

No you don't. Simply no.

If you are not interested in answering my questions why should I be interested in helping you?

If you read How to use this forum it will tell you how to ask questions here.

If you are not interested in answering my questions why should I be interested in helping you?

I told everything true here but unfortunately getting negative comments. Now let me share the code

#define LED_PIN 11


// These constants won't change.  They're used to give names
// to the pins used:
const int analogInPin = A0;  // Analog input pin that the potentiometer is attached to


int sensorValue = 0;        // value read from the pot
int outputValue = 0;        // value output to the PWM (analog out)
int state = LOW;

void setup() {
  // initialize serial communications at 9600 bps:
  Serial.begin(9600);
  pinMode(LED_PIN, OUTPUT);
  }


void loop() {
  
  // send data only when you receive data:
  // read first analog input, divide by 4 to make the range 0-255:
  outputValue = analogRead(analogInPin)/4;
  
  // write the value to the pin 11
  analogWrite(LED_PIN, outputValue);
  Serial.print("Tx Data = ");
  Serial.println(outputValue);
   if (outputValue>0){
    digitalWrite(LED_PIN, HIGH);
    } else {
    digitalWrite(LED_PIN, LOW);
   }

   // send sensor values:
  Serial.write(outputValue);
    
  // wait 2 milliseconds before the next loop
  // for the analog-to-digital converter to settle
  // after the last reading:
  //delay(200);
}

Now my problem is I wish to check the binary data coming out of arduino in CRO. Can I connect CRO probe at Tx pin of arduino?

I told everything true here but unfortunately getting negative comments.

No you didn't. You did not say what you are trying to do. You did not draw a block diagram of your idea. If you can not understand these things, and think you have told everything then how do you think you are going to understand any answers you get.

// wait 2 milliseconds before the next loop
  // for the analog-to-digital converter to settle
  // after the last reading:
  //delay(200);

1) There is no need to wait for the A/D to settle 2) A delay 200 is 200ms NOT 2ms

Can I connect CRO probe at Tx pin of arduino?

Yes, remember to connect the ground lead as well.

We are still no closer in knowing what the hell you are trying to do.

Two students working on the same assignment, perhaps? http://forum.arduino.cc/index.php?topic=457254.0