Using USB Data+ or Data- as TX/RX?

Hey everyone,

So I'm a bit of a newbie here, but have reached a dead-end on a project I'm trying for class. I made a simple gaming controller using a Nano that will control stepper motors run by a Mega.

I'm using a spliced USB cable to power the Nano from the Mega's power, but I was curious if I could program the other 2 USB wires (Data+ and Data- / Green and White) to act as my RX/TX connection between the two.

I only need to send data (controls) from the Nano to the Mega.

Is this possible without being overly complex?

My backup plan is to run a separate wire taped to the USB for the Nano TX to the Mega RX, but it would be nice to have it all nice and cleanly wrapped up in the USB cable.

Thanks!

If nothing else is connected to the Data+/- pins, you can use them as you like.

DrDiettrich: If nothing else is connected to the Data+/- pins, you can use them as you like.

That sounds like a yes, awesome! How can map the TX or RX to the USB's interface?

I'm assuming this has to be done in programming, because a jumper would be a problem when trying to re-flash the arduino

I think you misunderstand something about that advice. You can not use the actual USB data lines for serial communication to a device. The advice was that if those lines are not being used by the computer or anything else you can put any signals you want through them. You can not simply wire these and expect to have serial sent from a USB device.