示例#1
0
def video_feed():
    if cfg.camera_detected:
        """Video streaming route. Put this in the src attribute of an img tag."""
        return Response(gen(cam.Camera()),
                        mimetype='multipart/x-mixed-replace; boundary=frame')
    else:
        return 'no video'
示例#2
0
else:
    import camera_files as camera

import single_point_tracking as tracking
import motor_control_l6470 as motor_control
import updates_listener
import web_ui
import image_preview
import camera_adjuster
import dithering
import messages
import coordinates_calibration
import gotoer

if __name__ == '__main__':
    cam = camera.Camera()
    cam.start()

    tracker = tracking.SinglePointTracking()
    tracker.start()

    seconds_per_rotation = (24. * 60. * 60.)
    gear_ratio = 128.
    steps_per_rotation = 400.
    base_steps_per_second_ra = steps_per_rotation * gear_ratio / seconds_per_rotation
    motor_ra = motor_control.MotorControl(
        bus=0,
        cs_pin=0,
        slave_pin=22,
        reset_pin=17,
        speed_adjustment_msg=messages.CMD_SET_SPEED_ADJUSTMENT_RA,
示例#3
0
#!/usr/bin/env python3

import timelapse
import camera_pi
# import config
# import tlconfig

cam = camera_pi.Camera()
tl = timelapse.TimeLapse(cam)

tl.config.PARAM['res'] = {'width': 1080, 'height': 1920}
tl.config.PARAM['interval'] = 90
tl.config.set_config()

for t in tl.timelapse():
    print(t)