raspberry-noaa-v2 icon indicating copy to clipboard operation
raspberry-noaa-v2 copied to clipboard

Notification LED via GPIO

Open pagan27 opened this issue 4 years ago • 6 comments
trafficstars

Hi! Can you add this feature to the program? Notification LED via GPIO. Example: two minutes before when the satellite come, the LED flashes for one second every ten seconds . When the recording, decoding is started, the LED is blinking until the process end. When everything is finished, the output files are created, the LED is lighting two minutes. Thanks for your response.

pagan27 avatar May 30 '21 08:05 pagan27

nice idea, but i think each GPIO setup would end up pretty bespoke to each user no?

Quite a nice thread here, and if i was going to do it i would simply the requirement a little by calling the GPIO light from the scheduled 'at' tasks so as they run the LED is flashed. I think the 'two minutes before' might add some complication in that you would then have to have another at task schedueld or the scehduled capture sequence effectively would have to start 2 min earlier and that might cut off more overlapping captures...

dom-robinson avatar Jun 07 '21 16:06 dom-robinson

we could allow some pre and post pass scripts to be called, then custom ones for gpio could be written?

Cadair avatar Jun 07 '21 17:06 Cadair

Custom scripts would be really helpful. Currently testing on a pi-top case with a small screen on it, this would be useful for the screen on this also

paradox-productions avatar Jun 08 '21 15:06 paradox-productions

I once had this idea running, an LED would light at begining of pass than end at the end off pass, i had the script looking out for when the rtl was running, and if it was it would switch on a gpio. here's the script below.

#!/usr/bin/python import RPi.GPIO as GPIO import os import subprocess GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.setup(18, GPIO.OUT)#Sets the GPIO pin to be an output pin GPIO.output(18, False) #Makes sure all LED's are at the same state (off)

RTL_SDR = b"/usr/local/bin/rtl_fm"

output = subprocess.check_output(["ps", "-ef"])

if RTL_SDR in output: GPIO.output(18, True) #Turn on LED else: GPIO.output(18, False) #Turn off LED

time.sleep(10) # Delay for 10 seconds

stevecrow74 avatar Jun 18 '21 10:06 stevecrow74

Ill tag this in as an enhancement (for the 'to do' lists!) - if you wanted to contribute the code do please generate a working PR, but try to make sure it has error handling and some exposure in the settings.yml so it can be defaulted to off, but turned on where users have the requirement (default off means it won't break systems where GPIO is used for other things etc)...

dom-robinson avatar Sep 29 '21 08:09 dom-robinson

settings.yml should have the gpio pin and an enable setting as options.

colinluthier avatar Jan 28 '22 05:01 colinluthier