Skip to content

Instantly share code, notes, and snippets.

View hailfinger's full-sized avatar
💭
Breaking things

Carl-Daniel Hailfinger hailfinger

💭
Breaking things
View GitHub Profile
@hailfinger
hailfinger / camver
Created November 23, 2020 21:53 — forked from Hermann-SW/camver
Determine Raspberry camera version connected to CSI-2
#!/bin/bash
dt=`vcgencmd get_camera | grep "detected=1"`
if [ "$dt" = "" ]; then
echo "no camera detected"
else
if [ "`which i2cdetect`" = "" ]; then
echo "i2cdetect not installed" ; exit
fi
cd `dirname $0`
if [[ ! -a camera_i2c ]]; then