When I run a terminal command in python, it throws an error. Below is the code I run from a .py-file in terminal:
import time
import os
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setup(12, GPIO.IN, pull_up_down = GPIO.PUD_UP)
GPIO.setup(16, GPIO.IN, pull_up_down = GPIO.PUD_UP)
GPIO.setup(18, GPIO.IN, pull_up_down = GPIO.PUD_UP)
while True:
if(GPIO.input(12) == 0):
os.system ('omxplayer /home/pi/Downloads/bell.mp3')
print("DOOR BELL RINGING")
os.system ("cd /home/pi/picam")
os.system ("./picam --alsadev hw:1,0 -w 640 -h 360 -v 800000 -f 24 --tcpout $")
time.sleep(1)
This code is for video streaming, but it doesn't work. The error message is:
sh: 1: ./picam: not found
./picam: not found
means it isn't in the directory or it is but doesn't have execute permissions.