Problem sending LM35dz via xbee ZB

Dear all,

i have trouble for sending LM35dz output with xbee.. current setup are, arduino uno smd rev3, xbee ZB (s2), and xbee shield and LM35dz..

LM35dz connected to pin A0 for analog read, and Vs to 5v pin..
the serial monitor work just fine.. and yet the other xbee with ftdi didnt received any data..

here's my code :

float temp;
int tempPin = 0;
int tx = 1;

void setup() {
  Serial.begin(9600);
  pinMode(tx, OUTPUT);
}

void loop() {
  temp = analogRead(tempPin);
  temp = temp * 0.48828125;
  
  digitalWrite(tx, temp);
    
  Serial.print("TEMPRATURE = ");
  Serial.print(temp);
  Serial.print("*C");
  Serial.println();
  
  delay( 1000 );
  
}

NB: im really new to microcontroller.. :smiley:

pin 0 and 1 are used for Serial IO ( like Serial.print(value):wink:
Dont use pin 1 for ant other data output.

When you declare temp:pin 0 you know it is A0
Your digitalWrite will set pin 1 HIGH or LOW. and nothing else. No tempdata is sent!

If you want to send temp - send with library that match the Xbee
I guess you will find much info regarding Zbee comm.