PiCapture › Reading input LED from Pi › Reply To: Reading input LED from Pi
March 21, 2018 at 12:59 pm
#1581
Keymaster
The blue LED indicates that video is locked. You can use PiVideo to check the status. The command line would be “pivideo -q lock”, and you can also use the pvideo_class.py module to query the status in your program:
import pivideo_class
vid=pivideo_class.PiVideo() # create a pivideo object
pivideo_port=vid.open # open it on the default port
result=vid.lock # get the lock status
if (result > 0):
print(“Blue light on, video locked, camera mode = “,result)
else:
print(“Blue light off, no video detected by PiCapture”)
Please see the pivideo_class.py file for more functions.