Skip to main content
Arduino

Return to Answer

Edited the graph to make clear that the LCD simulator and the serial monitor are processes on the same computer.
Source Link
Edgar Bonet
  • 45.1k
  • 4
  • 42
  • 81

If I were to do something like this on Linux, I would probably have the LCD simulator sit between the Arduino and the serial monitor, like this:

+---------------------------------------------------+ | host computer |
+-------------+ | +-------------------+ +------------------+ |
| | | | | | | | |
| Arduino UART-----tty LCD simulator ptmx-----pts Serial monitor | |
| | | | | | | | |
+-------------+ | +-------------------+ +-----------------+ |
 +---------------------------------------------------+

For this, you have to:

  1. open the serial port connected to the Arduino ("tty" on the figure)
  2. create a pair of pseudo-terminals (ptmx/pts)
  3. open the master side of the pair (ptmx)
  4. ask the user to open the slave side (pts) with his serial monitor
  5. forward all traffic but the LCD control messages between the Arduino and the pseudo-terminal.

I don't know how this works on MacOS, sincebut since the whole pseudo-terminal ideaconcept is a standard Unix conceptfeature, I would expect it to be verywork in a similar way on MacOS and Linux. But then I have no idea how hard hard it would be to port this to to Windows.

If I were to do something like this on Linux, I would probably have the LCD simulator sit between the Arduino and the serial monitor, like this:

+------------+ +-------------------+ +------------------+
| | | | | |
| Arduino UART-----tty LCD simulator ptmx-----pts Serial monitor |
| | | | | |
+------------+ +-------------------+ +------------------+

For this, you have to:

  1. open the serial port connected to the Arduino ("tty" on the figure)
  2. create a pair of pseudo-terminals (ptmx/pts)
  3. open the master side of the pair (ptmx)
  4. ask the user to open the slave side (pts) with his serial monitor
  5. forward all traffic but the LCD control messages between the Arduino and the pseudo-terminal.

I don't know how this works on MacOS, since since the whole pseudo-terminal idea is a standard Unix concept, I would expect it to be very similar. But then I have no idea how hard it would be to port this to Windows.

If I were to do something like this on Linux, I would probably have the LCD simulator sit between the Arduino and the serial monitor, like this:

+---------------------------------------------------+ | host computer |
+-------------+ | +-------------------+ +-----------------+ |
| | | | | | | |
| Arduino UART-----tty LCD simulator ptmx----pts Serial monitor | |
| | | | | | | |
+-------------+ | +-------------------+ +-----------------+ |
 +---------------------------------------------------+

For this, you have to:

  1. open the serial port connected to the Arduino ("tty" on the figure)
  2. create a pair of pseudo-terminals (ptmx/pts)
  3. open the master side of the pair (ptmx)
  4. ask the user to open the slave side (pts) with his serial monitor
  5. forward all traffic but the LCD control messages between the Arduino and the pseudo-terminal.

I don't know how this works on MacOS, but since the whole pseudo-terminal concept is a standard Unix feature, I would expect it to work in a similar way on MacOS and Linux. But then I have no idea how hard it would be to port this to Windows.

Source Link
Edgar Bonet
  • 45.1k
  • 4
  • 42
  • 81

If I were to do something like this on Linux, I would probably have the LCD simulator sit between the Arduino and the serial monitor, like this:

+------------+ +-------------------+ +------------------+
| | | | | |
| Arduino UART-----tty LCD simulator ptmx-----pts Serial monitor |
| | | | | |
+------------+ +-------------------+ +------------------+

For this, you have to:

  1. open the serial port connected to the Arduino ("tty" on the figure)
  2. create a pair of pseudo-terminals (ptmx/pts)
  3. open the master side of the pair (ptmx)
  4. ask the user to open the slave side (pts) with his serial monitor
  5. forward all traffic but the LCD control messages between the Arduino and the pseudo-terminal.

I don't know how this works on MacOS, since since the whole pseudo-terminal idea is a standard Unix concept, I would expect it to be very similar. But then I have no idea how hard it would be to port this to Windows.

AltStyle によって変換されたページ (->オリジナル) /