diff --git a/burnTest.py b/burnTest.py new file mode 100644 index 0000000..ea0760c --- /dev/null +++ b/burnTest.py @@ -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() diff --git a/twitchy.py b/twitchy.py new file mode 100644 index 0000000..712e6f2 --- /dev/null +++ b/twitchy.py @@ -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) +