Help with xbee dongle

I am making an energy monitor using arduino. I am able to get data from the arduino to my desktop using a usb cable and display certain values of current and voltage with some coding.

I would like to do it wireless and I plan to do it by using (xbee - xbee shield - arduino) to obtain inputs from arduino pins, and use a xbee dongle plugged into my desktop to get data from the (xbee - xbee shield - arduino) and display data on my desktop.

I have the code to get the values I wanted which are current, voltage, and power, which is done through arduino serial monitor. Can I do the same for the xbee dongle? Do I have to write another code to do it?

Will appreciate any help, thanks.

If the XBee is only acting as a cable between the devices, then why would you need to write a new application? Just use the XBee on the USB adapter connected to the PC in transparent mode.

Thanks for the reply.
I have a code that is used for arduino which reads data from analog pins on the arduino itself.

So to say, I can just attach the xbee on the xbee shield which is connected to my arduino, remove the usb cable, connect the xbee dongle with xbee attached to it to the computer, and whatever data that is transmitted will be shown?

Initially I am using arduino serial monitor when usb is attached. If I changed to use the xbee dongle, can I still use the same code and arduino application, set the port to COM5 which is the xbee dongle, and still be able to see the same data on the serial monitor?

Thanks for the help.

That is correct. What ever you provide as “Data” is what will be provided.