LoginSignup
17

More than 5 years have passed since last update.

Raspberry Piでカメラが認識しない際の対処法

Last updated at Posted at 2018-06-15

Raspberry Piでカメラモジュールが動かなくなった際のメモ。

$ raspistill -o test.jpgのように撮影してみたところ、
以下のようなエラー文が出ました。

mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates

$ vcgencmd get_cameraでカメラの状況を確認したところ、
supported=1 detected=1と返ってきました。

supportedは、Raspberry Pi 本体のインターフェース設定でカメラが有効化されているかどうかを表します。0→無効 1→有効です。
detectedはそのまま、カメラを検知しているかどうかです。
detectedが0の場合、カメラモジュールがきちんと接続しているか確認します。

カメラが無効になっている場合は、$ sudo raspi-configで、5番のInterfacing optionから
Screen Shot 2018-06-16 at 6.26.04.png

カメラを選択し、
Screen Shot 2018-06-16 at 6.22.55.png

Yesを選択してenableにします。
Screen Shot 2018-06-16 at 6.23.05.png

今回の場合、カメラの設定は有効になっていて、接続もちゃんとしており、ソフトウェアに問題があるようです。
$ sudo rpi-updateでファームウェア等のアップデートを行い、$ sudo rebootで再起動したら治りました。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17