Analog Write Issue with Xbee

Paul,

LOL. All good points. I apply all your recommendations.

Frederic,

I understand. I didn't really think I just used the function. I will remove the map function.

Everyone,

First I have a resistor and capacitor (10uF) hooked up to smooth the pwm from the analog write.

I hooked up my circuit to an o-scope and found this:

The top trace is of the sending signal before entering the sending arduino. You can see where I pressed on the flexi sensor four different times.

The second trace is of the receiving arduinos output signal from pin 9. It is garbage. It does not relate to the first trace at all.

The third larger trace is of the receiving arduino with the exampels->basic->Fade sketch uploaded to it. This was done as a baseline to prove that we can see smooth trace from the arduino.