Skip to content

Instantly share code, notes, and snippets.

@rivsc rivsc/photoflash.rb
Last active Sep 13, 2018

What would you like to do?
Raspberrypi with custom flash light
#!/usr/bin/env ruby
# @rivsc /
require 'rpi_gpio'
PIN_NUM = 12
RPi::GPIO.set_numbering :board
RPi::GPIO.setup PIN_NUM, :as => :output
# Active le relais
RPi::GPIO.set_low PIN_NUM
`raspistill -vf -hf -n -ss 30000 -sh 70 -q 95 -t 50 -o photo_#{'%Y-%m-%d_%H-%M')}.jpg`
# Déactive le relais (retrouve son état normal)
RPi::GPIO.set_high PIN_NUM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.