Lappの覚え書き

過去ログ41 2023/3/18 19:50

▼Tessho
CdS脈波+Schmittで音出し
実験しました。



▼lapp
ChatGPTその後
かのチャットAIは,技術的な質問は,英語なら,多少の文法の間違いや単語のミススペルは指摘することなく,意味を理解したうえで,専門的にも答えてくれるので,なんどもチャットをやり取りして,専門技術者と話をしているような気さえさせてくれる優れものである。

ところが,英語に直しにくい下のような質問をしたら
―――
日本では「安心安全な医療体制」などの表現が多くみられるのだが,安全は基準を定められる客観的指標だが,安心は,個人個人で認識(基準)が違うので,この両者を並べて表現するのは非科学的で不適切であると,私は思うが,どうか?
―――
An error occurred. If this issue persists please contact us through our help center at help.openai.com.
としか答えてくれない。help centerに電話すれば何らかの応答はあるだろうが,きっと日本語対応ではないだろうから,こっから先には進めない。

でも,ものすごく有用でかつ優秀なAIであることは確かだ。孤独な老人の話し相手にはなるな!

しっかし,AIは人間をダメにする気がするなあ〜〜〜〜


▼lapp
金属ケース探し
可変コンデンサー続きで,旧テッショウ塾で作った「方形波バランス方式電極インピーダンス測定器」(図1,図2)
を作って,きちんと金属ケースに入れよう・・・と思い立って,金属ケースを探した。

電子機器工作用に沢山のケースを持っていたのだが,滋慶医療科学大学大学院の実験室を
引き払う都合上,ほとんどの計測器,部品などは「捨てて」きたので,手元には,小さめ
の金属ケースとプラケースがあるのみ。そこで,いろいろ探して,図3の秋月のケース
(タカチの金属ケースT12-5-8,縦×横×深さ=120×80×50)を注文した。それが届く前
図書館に行ったついでに100円ショップを回って「大きめの金属ケース」を見つけた。
手ごろな2種を買ってきた。それがダイソーで買った図4,図5の右側の120×80×56の
蓋開閉式の金属ケース。左は今回購入したタカチの金属ケースでネジ止め式の蓋がついている。
図6はセリアの118×98×35の金属ケースなんだが,ボリュームを付けて下に回路を組む
となると,深さがちょっと足りない。表面の模様の凹凸も目盛板をつけるのにちょっと邪魔。
折角買った秋月ケースだが,これはまた取っておくことにして,ダイソーのを使うことにした。
だいたい,図7のような構想(ちょっと,置いて確かめた)。回路は少し変えるつもり。
金属箱の工作になると,メンドウさが3倍になるので,何時になるかなあ〜〜

https://i.imgur.com/IJTdCeC.jpg
https://i.imgur.com/hZGMh3w.jpg
https://i.imgur.com/z3KcBNG.jpg
https://i.imgur.com/bp5VLI5.jpg
https://i.imgur.com/N6XZppD.jpg
https://i.imgur.com/EUOtLVs.jpg
https://i.imgur.com/LVAGfMO.jpg


▼Tessho
Arduinoで脈波から心拍数を検出するスケッチ
確かにAIは人間をダメにする!

今,やってることを質問した。

Q:How to get the cardiac pulse rate by Arduino?

A:To measure the cardiac pulse rate using Arduino, you can use a pulse sensor module that connects to the Arduino board. Here are the steps:

Connect the pulse sensor module to the Arduino board.
Write a program to read the analog signal from the pulse sensor using the "analogRead" function in Arduino.
Convert the analog signal to a digital signal using the "map" function in Arduino.
Use a timer to measure the time between two consecutive peaks of the digital signal.
Calculate the pulse rate by dividing the number of peaks by the time between two consecutive peaks and multiplying by 60 (since pulse rate is usually measured in beats per minute).
Here's an example code to get you started:

scss
Copy code
int pulseSensor = A0; // Connect the pulse sensor to analog pin A0
int threshold = 550; // Set the threshold for detecting a pulse
int pulseCount = 0; // Initialize the pulse count variable
unsigned long lastBeatTime = 0; // Initialize the time of the last beat variable
int pulseRate = 0; // Initialize the pulse rate variable

void setup() {
Serial.begin(9600); // Initialize the serial communication
}

void loop() {
int sensorValue = analogRead(pulseSensor); // Read the analog signal from the pulse sensor
if (sensorValue > threshold) { // If a pulse is detected
if (millis() - lastBeatTime > 1000) { // If the time since the last beat is more than 1 second
pulseCount++; // Increment the pulse count variable
lastBeatTime = millis(); // Update the time of the last beat variable
}
}
if (millis() - lastBeatTime > 2000 && pulseCount > 0) { // If the time since the last beat is more than 2 seconds and at least one pulse has been detected
pulseRate = (pulseCount * 60) / ((millis() - lastBeatTime) / 1000); // Calculate the pulse rate
Serial.println(pulseRate); // Print the pulse rate to the serial monitor
pulseCount = 0; // Reset the pulse count variable
}
}
Note that this is just an example code and you may need to adjust the threshold and timing parameters to get accurate results for your specific application. Also, please consult with a medical professional before using this or any other device for measuring your cardiac pulse rate.

大きなヒントになる。こっちの頭脳で考えなくても,AIちゃんが「こうしたらいいですよ」
とヒントをくれる。こういうのに「頼る」ようになったら,人間お終いだ!

「禁止tag排除」


▼Tessho
やじるし
1mmHg➡1V,1mL/s➡1mA







4240

掲示板に戻る