回答編集履歴

1

内容追記

2017/02/13 09:52

投稿

can110
can110

スコア38262

test CHANGED
@@ -11,3 +11,19 @@
11
11
  [pySerial](http://pythonhosted.org//pyserial/index.html)にpythonをシリアルとソケットをブリッジ接続するサンプルがあり、これがそのまま使えそうです。
12
12
 
13
13
  [TCP/IP - serial bridge](http://pythonhosted.org//pyserial/examples.html#tcp-ip-serial-bridge)
14
+
15
+
16
+
17
+ また、Rpi->Serial通信が間欠的にしか発生せず(速度も求めず)送信のみでよければ
18
+
19
+ `system`関数なりで`.py`を実行するのが単純でよいかもしれません。
20
+
21
+ ```C
22
+
23
+ // send.py : 引数(角度)をArduinoにシリアル送信するプログラム
24
+
25
+ system( "python send.py 123") # 123度を送る
26
+
27
+ ```
28
+
29
+