Skip to main content
Arduino

Return to Revisions

2 of 2
Edited the graph to make clear that the LCD simulator and the serial monitor are processes on the same computer.
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, 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.

Edgar Bonet
  • 45.1k
  • 4
  • 42
  • 81

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