import play_video import time import subprocess import socket import fcntl import struct # emulated camera #from camera import Camera # Raspberry Pi camera module (requires picamera package) from camera_pi import Camera app = Flask(__name__) movedir = base.MoveCtrl() movie_1 = play_video.Play_vdo() demos = demo.DemoList() #pan =servo.ServoController(25) #pan.setAngle(0) #tilt =servo.ServoController(24) #tilt.setAngle(0) #motorA = motor.MotorController(8,7) #motorB = motor.MotorController(10,9) @app.route('/') def index():
import base import time move1 = base.MoveCtrl() move1.move('f') time.sleep(3) move1.move('s') time.sleep(1) move1.move('b') time.sleep(3) move1.move('s')
import serial import subprocess import base import time import math demo_do = base.MoveCtrl() class DemoList: def demoAction(self): #### Play media file subprocess.call( "mplayer -vo fbdev2:/dev/fb1 -x 240 -y 320 -framedrop -quiet -input file=/home/pi/fifos /home/pi/BiBli/brain/demos/bibli_demo.mp4 < /dev/null && sudo fbi -T 2 -d /dev/fb1 -noverbose -a /home/pi/BiBli/media/image/bg2.jpg &", shell=True) time.sleep(2) #### BiBli motion demo_do.move('b') time.sleep(2) demo_do.move('f') time.sleep(2) demo_do.move('l') time.sleep(1) demo_do.move('r') time.sleep(2) demo_do.move('l') time.sleep(1) demo_do.move('s')