フィルターのクリア

Clicking photos through Raspberry Pi Camera Board

1 回表示 (過去 30 日間)
Roston Mascarenhas
Roston Mascarenhas 2022 年 2 月 13 日
回答済み: Pravarthana P 2022 年 2 月 18 日
mypi = raspi; cam = cameraboard (mypi); ButtonPress= readDigitalPin(mypi,23); if ButtonPress img = snapshot (cam); img = imagesc (img); end
I want to click photos through raspberry pi with raspberry pi camera board in MATLAB when we press push button. I wrote a MATLAB code for this which is shown in below figure.
Even if I connect the digital pins directly to wires still my readDigitalPin shows 0.
Could you please help me with this?

回答 (1 件)

Pravarthana P
Pravarthana P 2022 年 2 月 18 日
Hi Roston Mascarenhas, it can be understood from your query that readDigitalPin() function returns value 0 even after connecting the digital wires. This may be due to the following issues, you may try the listed workaround:
  • Check with a switch case to see what happens through the code.
  • Check if the pin has been assigned as output pin instead of input pin inorder to read from the pin.
You may find the following documents useful:

カテゴリ

Help Center および File ExchangeRun on Target Hardware についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by