Tuesday, April 22, 2014

Running shell commands from the python on raspberry pi and beaglebone black

//displaying the date command

import os
os.system("date")


//taking the input from the your and processing that using the python

import os
os.system("date")
user_input = input('Give me a number: ')
if user_input==1 :
os.system("omxplayer -o hdmi /home/pi/videos/Kommalallo.mp4")
elif user_input==2 :
os.system("omxplayer -o hdmi /home/pi/videos/Poovai.flv")
elif user_input==3 :
os.system("omxplayer -o hdmi /home/pi/videos/RamChahe.mp4")
elif user_input==4 :
os.system("omxplayer -o hdmi /home/pi/videos/Sasirekha.mp4")
elif user_input==5 :
os.system("omxplayer -o hdmi /home/pi/videos/Kommalallo.mp4")
else:
os.system("ctrl+c")




No comments:

Post a Comment

MM32f103 led blink program

To work on mind motion MM32 microcontroller we need to install the keil uvision 5 version then install the mm32-link programmer go to li...