- moved the additions into the lib folder

- created an update script
 - changed git settings
pull/2/head
Trivernis 7 years ago
parent c266d6c6c6
commit 92efbd87c2

@ -1,10 +0,0 @@
<component name="ProjectDictionaryState">
<dictionary name="Trive">
<words>
<w>adafruit</w>
<w>pygame</w>
<w>smbus</w>
<w>sudo</w>
</words>
</dictionary>
</component>

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.6.4 (~/anaconda3/bin/python)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="projectConfiguration" value="Nosetests" />
<option name="PROJECT_TEST_RUNNER" value="Nosetests" />
</component>
</module>

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6.4 (~/anaconda3/bin/python)" project-jdk-type="Python SDK" />
<component name="masterDetails">
<states>
<state key="ScopeChooserConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>

@ -1,4 +1,4 @@
import gyro
from lib import gyro
import time
while True:
print(gyro.getAllOut()['rot'])

@ -0,0 +1,7 @@
from lib import ultrasonic
sensor= ultrasonic.Sensor()
sensor.init(11,7)
print('Beginn der Messung')
print(sensor.echo())
sensor.clean()

@ -1,4 +1,5 @@
import pygame, picamera, ultrasonic#,gyro
import pygame, picamera #,gyro
from lib import ultrasonic
from datetime import datetime
from subprocess import call
import RPi.GPIO as GPIO
@ -71,17 +72,17 @@ def reset_dire():
def drive_left():
if not left:
call(['python', 'servo_2.py','left'])
call(['python', './lib/servo_2.py','left'])
return
def drive_right():
if not right:
call(['python', 'servo_2.py','right'])
call(['python', './lib/servo_2.py','right'])
return
def reset_turn():
if left or right:
call(['python','servo_2.py'])
call(['python','./lib/servo_2.py'])
return
# ____________________________
# -- special functions
@ -108,6 +109,7 @@ def turn_rec(*record):
def imgRefresh():
#turn_rec(True)
image = None
try:
image = pygame.image.load('image.jpg')
image = pygame.transform.scale(image, (192*2, 108*2))

@ -1,6 +0,0 @@
import ultrasonic
sensor=ultrasonic.Sensor()
sensor.init(11,7)
print('Beginn der Messung')
print(sensor.echo())
sensor.clean()

@ -0,0 +1,13 @@
#!/usr/bin/env bash
cd ..
if [ -d "spydian/" ];then
sudo git clone https://bitbucket.org/trivernis/spydian.git spydian_update
sudo rsync -a ./spydian_update/ ./spydian/
sudo rm -r ./spydian_update/
sudo chmod -R u+rw ./spydian/
exit 0
else
sudo git clone https://bitbucket.org/trivernis/spydian.git spydian
sudo chmod -R u+rw ./spydian/
exit 0
fi
Loading…
Cancel
Save