Skip to content

Commit 1434310

Browse files
update README.md
1 parent a830c2a commit 1434310

File tree

4 files changed

+18
-17
lines changed

4 files changed

+18
-17
lines changed

README.md

+8-14
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,24 @@ Tera-termやArduino IDEコンソールなどでライトウェイトにUARTデ
2727

2828
## Installation
2929

30-
```
31-
make setup
32-
make chmod
33-
```
34-
35-
OSS公開後には以下のインストール方法が使える予定
3630
```
3731
pip install pyuart
32+
sudo chmod 666 /dev/ttyUSB0
3833
```
3934

40-
```make chmod```は環境依存です。/dev/serial/* やlsusbなど駆使してUSB-TTL converterデバイスを探しましょう。
41-
詳細はMakefileを読むと理解の助けになるでしょう。
35+
上記例のデバイスファイル名 ```/dev/ttyUSB0```は環境依存です。ご自身の環境に対応したデバイスファイル名をご指定ください。
4236

4337

4438
## サンプル
4539

46-
```aelib/uart```モジュールの操作方法のサンプルコードを以下にメモしておきます。
40+
```pyuart```モジュールの操作方法のサンプルコードを以下にメモしておきます。
4741
このサンプルを見るだけで動かすことができるはずですが、詳細な説明は後日記載する予定です。
4842

4943

5044
### 例1: 1 octetづつTx(送信)したい場合
5145

5246
```:test_tx.py
53-
from aelib import uart
47+
from pyuart import uart
5448

5549
u0 = uart.uart(dev='/dev/ttyUSB0', baudrate = 115200, timeout = 15)
5650
u0.open()
@@ -66,7 +60,7 @@ u0.close()
6660
### 例2: 1 octetづつRx(受信)したい場合
6761

6862
```:test_rx.py
69-
from aelib import uart
63+
from pyuart import uart
7064

7165
u0 = uart.uart(dev='/dev/ttyS0', baudrate = 115200, timeout = 240)
7266
u0.open()
@@ -83,7 +77,7 @@ u0.close()
8377
### 例3: ファイルをTx(送信)したい場合
8478

8579
```:sample.tx.file.py
86-
from aelib import uart
80+
from pyuart import uart
8781

8882
u0 = uart.uart(dev='/dev/ttyUSB0', baudrate = 115200, timeout = 15)
8983
u0.open()
@@ -97,7 +91,7 @@ u0.close()
9791
### 例4: ファイルをRx(受信)したい場合
9892

9993
```sample.rx.file.py
100-
from aelib import uart
94+
from pyuart import uart
10195

10296
u0 = uart.uart(dev='/dev/ttyUSB0', baudrate = 115200, timeout = 15)
10397
u0.open()
@@ -123,7 +117,7 @@ UARTを使ったデータ通信では受け取るファイルのサイズは上
123117
```mpi.tx.py
124118
#!/usr/bin/env python3
125119
from mpi4py import MPI
126-
from aelib import uart
120+
from pyuart import uart
127121

128122
comm = MPI.COMM_WORLD
129123
proc_id = comm.Get_rank()

pypi/Makefile

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Time-stamp: <2023-06-05 17:00:34 hamada>
1+
#Time-stamp: <2023-06-05 22:53:58 hamada>
22

33
wheel:
44
python3 setup.py bdist_wheel
@@ -7,7 +7,13 @@ wheel:
77
clean:
88
rm -rf build pyuart.egg-info dist
99

10-
test.upload:
10+
test.deploy:
1111
twine upload --repository testpypi dist/*
1212

13+
deploy:
14+
twine upload --repository pypi dist/*
15+
16+
17+
setup:
18+
pip install wheel twine
1319

pypi/pyuart/__init__.py

Whitespace-only changes.

pypi/setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
name='pyuart', # パッケージ名(プロジェクト名)
1313
packages=['pyuart'], # パッケージ内(プロジェクト内)のパッケージ名をリスト形式で指定
1414

15-
version='0.0.1', # バージョン
15+
version='0.0.5', # バージョン
1616

1717
license='MIT', # ライセンス
1818

19+
#install_requires=['pyserial-3.5'], # pip installする際に同時にインストールされるパッケージ名をリスト形式で指定
1920
install_requires=['pyserial'], # pip installする際に同時にインストールされるパッケージ名をリスト形式で指定
2021

2122
author='Tsuyoshi Hamada', # パッケージ作者の名前

0 commit comments

Comments
 (0)