前回はLinux上でのネットワークプログラミングをやって(コピペして)みましたが、 今回はシリアル通信のプログラミングをやってみたいと思います。 参考元:The Linux Serial Programming HOWTO(日本語版) 時々見れない場合もあるので、そんなときは英語版の方を参照してください。 検索すれば他の日本語訳のサイトも見つかるかもしれません。 上記ページにあったサンプルコードをいじって、受信と送信でプロセスを分けて処理する形に変更してみました。 実験したところ、無事Arduinoからのデータの受信と、送信ができるようになりました。 #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <string.h> #include <termios.h> #i