Exemplo n.º 1
0
import sys
import beacon_test4 as bt14
import beacon2_test2 as bt22
import beacon3_test2 as bt32
import ultrasonic_test4 as ut4

import cv2
import numpy as np

import tortoise as t

import turning as turn

import time

t.update_config(TORTOISE_WALK_PERIOD = 0.1)


class TestPatio2(t.Task):
    def __init__(self):
        super(TestPatio2, self).__init__()

        self.beacon1_tracing = bt14.beacon_detection()
        self.beacon2_tracing = bt22.beacon_detection()
        self.beacon3_tracing = bt32.beacon_detection()
        self.running_against_wall = ut4.distance_maintaining()
        self.lll = 0
        self.kkk = 0
        self.ccc = 0
        self.count = 0
        self.count_pic = 0
Exemplo n.º 2
0
import time

import tortoise as t
from tortoise.effectors import RxTx

t.update_config(CONTROLLER_PORT_REGEX='usbmodem')

rt = RxTx()

rt.send('hello')

time.sleep(0.1)

print rt.recv()