inital dump

This commit is contained in:
2021-09-04 23:20:35 +02:00
parent 8d187d4413
commit 976d93836a
189 changed files with 26587 additions and 0 deletions

View File

@ -0,0 +1,4 @@
[Dolphin]
PreviewsShown=false
Timestamp=2018,6,23,12,56,2
Version=4

View File

@ -0,0 +1,17 @@
from spidev import SpiDev
from time import sleep
spi = SpiDev()
spi.open(0,0)
def readMPC(channel):
adc = spi.xfer2([1, (8 + channel) << 4, 0])
data = ((adc[1] & 3) << 8) + adc[2]
return data
while 1:
value = readMPC(0)
print("Anliegende Spannung: %.2f" % (((value / 1023.0 * 3.3)*6.62)*0.95) )
sleep(0.5)

View File

@ -0,0 +1 @@
apt-get install python3-RPi.GPIO

View File

@ -0,0 +1,29 @@
# coding: utf-8
import RPi.GPIO as GPIO
from spidev import SpiDev
from time import sleep
spi = SpiDev()
spi.open(0,0)
GPIO.setmode(GPIO.BCM)
GPIO.setup(25, GPIO.OUT)
GPIO.setup(18, GPIO.OUT)
def readMPC(channel):
adc = spi.xfer2([1, (8 + channel) << 4, 0])
data = ((adc[1] & 3) << 8) + adc[2]
return data
while 1:
value = readMPC(1)
if (value / 1023.0 * 3.3) > 0:
GPIO.output(25, GPIO.HIGH)
GPIO.output(18, GPIO.HIGH)
else:
GPIO.output(25, GPIO.LOW)
GPIO.output(18, GPIO.LOW)
sleep(0.1)

View File

@ -0,0 +1,45 @@
<!DOCTYPE txt>
<!Version: 0.1>
<!Date: 16.11.2017>
raspi-config
---------------------------
Interfacing Options
I2C enable
----------------------------
nano /boot/config.txt
add at end
--------------------------
# Enable HWclock
dtoverlay=i2c-rtc,ds3231
-------------------------
nano /lib/udev/hwclock-set
comment out
--------------------------
if [ -e /run/systemd/system ] ; then
exit 0
fi
-------------------------
Good to know:
read time directly from rtc module
hwclock -r
update rtc module time from system time (system time should be regularly updated by ntp from the internet if your pi is networked):
hwclock -w
update system time from the rtc module (this should happen on startup):
hwclock -s
and the most fun of all - monitor the "drift" between your system clock and the rtc module:
hwclock -c

View File

@ -0,0 +1,16 @@
raspi-config
--------------
SPI an machen
-------------
apt-get install python3-dev
wget https://github.com/doceme/py-spidev/archive/master.zip
unzip master.zip
cd py-spidev-master
python3 setup.py install

View File

@ -0,0 +1,26 @@
echo "-----------------------------"
echo "-----------------------------"
echo "-----------------------------"
echo "---starting sharpness tool---"
echo "-----------------------------"
echo "-----------------------------"
killall python3
sleep 5
while [ true ]
do
echo "normal output"
sleep 2
raspivid -t -0 &
sleep 10
killall raspivid
echo "zoom output"
sleep 2
raspivid -t -0 -roi 0.1,0.2,0.3,0.4 &
sleep 10
killall raspivid
done