added testing scripts

master
Izzy Brand 2018-01-10 10:24:05 -05:00
rodzic 1d2f1862ac
commit aa76406436
2 zmienionych plików z 25 dodań i 0 usunięć

12
burnTest.py 100644
Wyświetl plik

@ -0,0 +1,12 @@
import RPi.GPIO as GPIO
from config import *
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(BURN_PIN, GPIO.OUT)
GPIO.output(BURN_PIN, GPIO.LOW)
raw_input('Press enter to burn')
GPIO.output(BURN_PIN, GPIO.HIGH)
time.sleep(5)
GPIO.output(BURN_PIN, GPIO.LOW)
GPIO.cleanup()

13
twitchy.py 100644
Wyświetl plik

@ -0,0 +1,13 @@
from dronekit import connect, VehicleMode
import time
import numpy as np
vehicle = connect('/dev/ttyACM0', baud=115200, wait_ready=True)
vehicle.mode = VehicleMode('MANUAL')
vehicle.armed = True
while True:
vehicle.channels.overrides['2'] = np.random.randint(1300,1700)
vehicle.channels.overrides['1'] = np.random.randint(1300,1700)
time.sleep(0.2)