Search code examples
javaarduinousbserial-communication

Custom signals from USB


TL;DR: I need to send custom pulses through a USB cable to an Arduino UNO using Java.

So, what I want to do is to simulate the serial signals from a GPS module to an Arduino UNO.
To do this, I plan to use the signal wires of a USB 2.0 connector with the RX and GND pins of the Arduino.

Because good software is hard to find and this is a good oppurtunity to practise, I would like to write it myself using Java.


Solution

  • You didn't ask any actual questions, but I suppose if you did ask a question then the answer might be that this project will be impossible. The low-level USB hardware and drivers do not allow you to send arbitrary pulses as far as I know.

    A more reasonable plan to do this simulation would be to get a USB-to-Serial adapter. If you install the drivers properly, then you can connect to the serial port from your Java program just as you would connect to any other serial port, perhaps using a Java library like RXTX.