from hardware import Hardware from time import sleep hardware = Hardware() hardware.connect() hardware.set_target(0, 0) angle = 0 f = 1 try: while True: angle += f * 1 if angle == 180 or angle == 0: f = -1 * f #angle %= 180 hardware.set_target(0, (angle - 90)) hardware.loop() sleep(0.01) except KeyboardInterrupt: hardware.stop()
global obj http_text = obj_s.current_object if http_text is None: obj = None else: try: obj = SpaceObject(known_objects[http_text]) except: print "Couldn't Find Object..." print "Set to object: ", obj obj_s = object_setter() current_obj = obj_s.current_object hardware.set_target(0, 0) hardware.run_loop(verbose=False) while True: try: if current_obj != obj_s.current_object: current_obj = obj_s.current_object set_object() print obj if obj is None: alt, az = 0, 0 else: alt, az = obj.getCoordinates()