ダウンロードリスト

プロジェクト概要

家電の自動化、防犯、防災、音声応答制御システムを開発しています

出先から部屋の温度を確認してクーラー運転する

夕方外が暗くなると玄関や部屋の明かりを点ける

明け方に外の湿度を元に家庭菜園の水やりをする

防犯センサーがはたらくと動画をメールする

決まった時間に音楽を鳴らす

火災感知器が発報するとメールと電話(ワンギリ)で知らせる

外気湿度を元に床下換気扇を間欠運転させる

などRaspberry PiでIOTハウスを実践しています

机の奥へ仕舞い込んだRaspberry Piでホームエレクトロニクス&ホームセキュリティを実現しよう

https://github.com/kujiranodanna/IOT-House

システム要件

システム要件が設定されていません

リリース時刻: 2021-04-23 17:19
chobit_prog pepocp2112ctl (1 個のファイル 非表示)

リリースノート

It is a program that can operate MM-CP-2112A or CP2112 classic USB bridge on Linux. It operates temperature and humidity sensor AM2320 and environmental gas sensor BME680 at the same time.

# pepocp2112ctl

** Welcome to pepocp2112ctl Version-0.5 Copyright Isamu.Yamauchi compiled:Feb 15 2022 **

usage:pepocp2112ctl port:0-8 0|1 [timer:0-300000ms]

usage:pepocp2112ctl port:0-3 output, 4-7 input

usage:pepocp2112ctl 5 <--AM2320 measured

usage:pepocp2112ctl 10 <--BME680 measured

Output port 0-3

Input port 4-7

It is fixed to

Port No.0 read

# pepocp2112ctl 0

0

Set port No.0 to 1

# pepocp2112ctl 0 1

1

Set port No.0 to 1 for 5 seconds

# pepocp2112ctl 0 1 5000

0

Display of temperature and humidity of AM 2320 of I2C connection

# cat /www/remote-hand/tmp/.pepocp2112bme680

2022/02/16/17:17:00,16.1,51.5,1012.8,1309408

# pepocp2112ctl 5

23.6 49.3


pepocp2112ctl uses semaphore for exclusive control, You can check the usage time with apache with the following command

# ipcs -t

------ Message Queues Send/Recv/Change Times --------

msqid owner send recv change

------ Shared Memory Attach/Detach/Change Times --------

shmid owner attached detached changed

23953408 lightdm Jan 28 18:27:10 Jan 28 18:27:10 Jan 28 18:27:08

23986177 lightdm Jan 28 18:27:11 Not set Jan 28 18:27:11

------ Semaphore Operation/Change Times --------

semid owner last-op last-changed

19628032 www-data Wed Feb 16 17:29:21 2022 Tue Feb 15 18:38:56 2022

19595265 root Wed Feb 16 17:29:22 2022 Tue Feb 15 17:46:05 2022

LinuxでMM-CP-2112A又はCP2112 クラシック USB ブリッジを動作させる事が出来るプログラムです、温度湿度センサーAM2320、環境ガスセンサーBME680を同時に動作させます。

出力ポート 0-3

入力ポート 4-7

に固定されています

ポートNo 0番目の読み取り

# pepocp2112ctl 0

0

ポートNo 0番目を 1 へ設定

# pepocp2112ctl 0 1

1

ポートNo 0番目を5秒間 1 へ設定

# pepocp2112ctl 0 1 5000

0

# pepocp2112ctl

** Welcome to pepocp2112ctl Version-0.5 Copyright Isamu.Yamauchi compiled:Feb 15 2022 **

usage:pepocp2112ctl port:0-8 0|1 [timer:0-300000ms]

usage:pepocp2112ctl port:0-3 output, 4-7 input

usage:pepocp2112ctl 5 <--AM2320 measured

usage:pepocp2112ctl 10 <--BME680 measured

I2C接続BME680の温度、湿度、気圧、ガス(オーム)連続ファイル出力

# cat /www/remote-hand/tmp/.pepocp2112bme680

2022/02/16/17:17:00,16.1,51.5,1012.8,1309408

Temperature / humidity display of I2C connection AM2320

# pepocp2112ctl 5

23.6 49.3


pepocp2112ctlはsemaphoreを使い排他制御しています、以下コマンドでapacheと共に使用時間が確認出来ます

# ipcs -t

------ Message Queues Send/Recv/Change Times --------

msqid owner send recv change

------ Shared Memory Attach/Detach/Change Times --------

shmid owner attached detached changed

23953408 lightdm Jan 28 18:27:10 Jan 28 18:27:10 Jan 28 18:27:08

23986177 lightdm Jan 28 18:27:11 Not set Jan 28 18:27:11

------ Semaphore Operation/Change Times --------

semid owner last-op last-changed

19628032 www-data Wed Feb 16 17:29:21 2022 Tue Feb 15 18:38:56 2022

19595265 root Wed Feb 16 17:29:22 2022 Tue Feb 15 17:46:05 2022

変更履歴

o 2022.2.16 Ver0.5

bug fix mysem_lock,mysem_unlock,am2320_measured

o 2021.4.23 Ver0.4

bug fix gpio output pin is reset when the command is executed

o 2021.4.11 Ver0.3

bug fix BME680 and AM2320 cannot be operated at the same time

o 2021.3.28 Ver0.2

Added support for some bug fixes and BME680 Existing bug BME680 and AM2320 cannot be operated at the same time

o 2018.1.6 Ver0.1 1st release

o 2022.2.16 Ver0.5

bug fix mysem_lock,mysem_unlock,am2320_measured

o 2021.4.23 Ver0.4

bug fix gpio output pin is reset when the command is executed

o 2021.4.11 Ver0.3

bug fix BME680 and AM2320 cannot be operated at the same time

o 2021.3.28 Ver0.2

Added support for some bug fixes and BME680 Existing bug BME680 and AM2320 cannot be operated at the same time

o 2018.1.6 Ver0.1 1st release