-1

I am currently trying to trigger a MAPIR Survey3 NDVI Camera with a PWM Signal. The camera is connected via this HDMI trigger cable. For the camera to trigger I need a 2 ms PWM signal. I have given this PWM signal to the camera via a push button.

I have tried this python script:

import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(4, GPIO.OUT)
p = GPIO.PWM(4, 350)
p.start(66)

Camera should click picture whenever PWM signal is recieved. The problem is that when I press the button, sometimes the picture gets clicked (means it get triggered) and sometimes not (not trigger occurs?y this problem occurs ?

4
  • ` camera is connected via this HDMI trigger cable.` What cable and what are the specs for the necessary PWM signal? And how exactly is the PWM pin connected to your camera? Are you using the correct pin? Please update your question.
    – Dirk
    Commented Jan 30, 2019 at 11:47
  • The Survey3 camera can receive and act on a couple PWM values when sending a PWM pulse using the optional HDMI PWM trigger cable. The 1000us neutral value is the default value the camera is always expecting and will not do anything at that pulse width. To capture a photo, send the camera a momentary 2000us pulse.
    – Jashan
    Commented Jan 30, 2019 at 11:51
  • Raspberry Pi is used to connect MAPIR .
    – Jashan
    Commented Jan 30, 2019 at 11:53
  • Please re-read my comment, especially Please update your question. and also about the physical connection. I have no idea what the 'HDMI PM trigger cable' is and to me it sounds as if you're not connecting to GPIO4 at all. And again: edit your question with any mods and updates.
    – Dirk
    Commented Jan 30, 2019 at 13:10

1 Answer 1

0

Try (my) pigpio.

sudo pigpiod

pigs s 4 1000

To trigger a photo

pigs s 4 2000 mils 100 s 4 1000

man pigs for help

2
  • Do I need to install this library or it's already installed ?
    – Jashan
    Commented Jan 31, 2019 at 11:47
  • It should be already installed if you use Raspbian.
    – joan
    Commented Jan 31, 2019 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.