kopia lustrzana https://github.com/IzzyBrand/spaceplane
added testing scripts
rodzic
1d2f1862ac
commit
aa76406436
|
@ -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()
|
|
@ -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)
|
||||
|
Ładowanie…
Reference in New Issue