Exemple #1
0
def scanSuspect():
	time.sleep(2)
        if True:
                sts.setSpeed(100)
                sts.forward()
                time.sleep(2)
                sts.stop()
		time.sleep(1)
Exemple #2
0
def scenario1():
	sts.forward()
	time.sleep(5)
	sts.stop()
	scanSuspect()
	sts.backward()
	time.sleep(5)
	sts.stop()
Exemple #3
0
def initiate():
	sts.forward()
	time.sleep(5)
	sts.stop()
	scanSuspect()
	sts.backward()
	time.sleep(5)
	sts.stop()
Exemple #4
0
def scanSuspect():
    #r = requests.get('http://jetson:5000/scan')
    time.sleep(2)
    if True:
        sts.setSpeed(100)
        sts.forward()
        time.sleep(2)
        sts.stop()
        time.sleep(1)
Exemple #5
0
def scanSuspect():
	r = requests.get('http://127.0.0.1:5000/scan')
	time.sleep(2)
        if r.text == "attack":
                sts.setSpeed(100)
                sts.forward()
                time.sleep(2)
                sts.stop()
		time.sleep(1)
	return r.text
Exemple #6
0
def sectionB():
    sts.forward()
    time.sleep(2)
    sts.turnLeft()
    time.sleep(1)
    sts.forward()
    time.sleep(6)
    sts.stop()
    scanSuspect()
    sts.backward()
    time.sleep(8)
    sts.turnRight()
    time.sleep(1)
    sts.backward()
    time.sleep(2)
    sts.stop()
Exemple #7
0
def sectionA():
    sts.forward()
    time.sleep(4)
    sts.turnRight()
    time.sleep(1)
    sts.forward()
    time.sleep(3)
    sts.stop()
    scanSuspect()
    sts.backward()
    time.sleep(5)
    sts.turnLeft()
    time.sleep(1)
    sts.backward()
    time.sleep(4)
    sts.stop()
Exemple #8
0
def forward(request):
	sts.forward()
	return HttpResponse("Forward")