Giter VIP home page Giter VIP logo

rpi_motorized_ircut_control's Introduction

CameraLED

Pure python3 library to control Camera LED for RaspberryPi 3

Background

This library is used for ArduCAM with motorized IR Cut Filter.
The IR Cur filter is connected to the camera LED, so by controlling the LED you can control the IR filter.
This python library is used to control the camera LED (and IR filter) on Raspberry 3. .

Prerequisites

You have to disable the automatic management of camera led in /boot/config.txt.

$ echo "disable_camera_led=1" | sudo tee -a /boot/config.txt 
$ sudo reboot

Installation

$ wget https://raw.githubusercontent.com/arducam/RPI_Motorized_IRCut_Control/master/CameraLED.py 
$ chmod 755 CameraLED.py

Usage

You need to be root (or at least be able to use sudo).

Standalone

You can use the library as a standalone command:

$ sudo ./CameraLED.py 
Usage: ./CameraLED.py (state|toggle|on|off)

$ sudo ./CameraLED.py state
State: 0

$ sudo ./CameraLED.py toggle
State: 1

$ sudo ./CameraLED.py toggle
State: 0

$ sudo ./CameraLED.py on    
State: 1

$ sudo ./CameraLED.py off
State: 0

For Pi4 with UC350 Rev.B

$ python RPI_Camera_PI4_Ircut_ctl.py on    
State: 1
$ python RPI_Camera_PI4_Ircut_ctl.py off
State: 0

IMAGE ALT TEXT

Python library

You can use my library in your Camera projects

from CameraLED import CameraLED
led = CameraLED() # CameraLED(134)
led.on()
led.off()
led.toggle()
led.state()

Photos

LED OFF = NO IR filter = Night vision
image
LED ON = IR filter = Daily vision
image ย 

Thanks

Thanks to Lorenzo Santina for sharing https://github.com/BigNerd95/CameraLED

rpi_motorized_ircut_control's People

Contributors

arducam avatar dtsmith2001 avatar uctronics avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rpi_motorized_ircut_control's Issues

Toggle isn't working

Hey,

tried to use it with Buster/pi Zero 2 and it seems to be broken:
State always reports 0 :(
Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.