LoginSignup
0
0

More than 1 year has passed since last update.

PiCamera module v2を有効にする

Last updated at Posted at 2022-08-14

はじめに

Raspberry Pi Camera V2を動かす記事はRaspi-configを使う方法が多く出ているが、
Raspi-configを持たないUbuntu1804やserver等では、依存関係などもあり、インストールが面倒です。
その為、Raspi-configを使わない方法をまとめる。

実行環境

ホスト RaspberryPi 3B+
OS Ubuntu 18.04.3 LTS
カメラ Raspberry Pi Camera V2

1. /boot/firmware/config.txt を編集

start_x=1             # essential
gpu_mem=128           # at least, or maybe more if you wish
disable_camera_led=1  # optional, if you don't want the led to glow

2. v4l2ドライバーの読み込み

Raspberry Pi の PiCameraを使用する場合、オフィシャルのV4L2ドライバーをロードする必要がある。
下記のコマンドでraspiカメラを扱うためのポート(/dev/video0)を開けます。

$ sudo modprobe bcm2835-v4l2

起動時に自動的にロードできるように、/etc/modules ファイルに以下の行を追加する。

bcm2835-v4l2
0
0
0

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
0
0