Raspberry Pi Raspbian: Difference between revisions
Jump to navigation
Jump to search
>Homaar No edit summary |
(→GPIO) |
||
Line 59: | Line 59: | ||
</pre> | </pre> | ||
= analog digital converters ADS1015 / ADS1115 | <nowiki>= analog digital converters ADS1015 / ADS1115 =</nowiki> | ||
=networking= | =networking= |
Revision as of 15:43, 26 August 2023
einfach ein leeres file namens ssh auf die boot partition kopieren.
- default user/passs
Distribution | Username | Password ---------------|------------|------------- Debian Squeeze | pi | raspberry Arch | root | root QtonPi | root | rootme Raspbian | pi | raspberry OpenElec | root | openelec
timesyncd
edit /etc/systemd/timesyncd.conf and uncomment ntp section!
sudo systemctl enable systemd-timesyncd --now timedatectl sudo timedatectl set-ntp false sudo timedatectl set-ntp true timedatectl show-timesync
Sensors, InfluxDB, MQTT and Grafana
GPIO
- https://www.raspberrypi.org/documentation/usage/gpio/
- https://www.instructables.com/id/Controlling-Any-Device-Using-a-Raspberry-Pi-and-a-/
sudo apt-get install rpi.gpio sudo apt install python3-rpi.gpio sudo apt install wiringpi
import RPi.GPIO as GPIO from time import sleep GPIO.setwarnings(False) pin = 4 GPIO.setmode(GPIO.BCM) GPIO.setup(pin, GPIO.OUT) while True: GPIO.output(pin, True) sleep(1) GPIO.output(pin, False) sleep(1)
= analog digital converters ADS1015 / ADS1115 =
networking
Note: With stretch release networking is configured in /etc/dhcpcd.conf
static eth0:
# Example static IP configuration: interface eth0 static ip_address=10.1.0.101/24 #static ip6_address=fd51:42f8:caae:d92e::ff/64 static routers=10.1.10.1 static domain_name_servers=10.1.0.1 8.8.8.8
default if names
add to cmdline.txt:
net.ifnames=0
wifi
generate config string via
wpa_passphrase ssid pw
add config entry via
/etc/wpa_supplicant/wpa_supplicant.conf
- copy wpa_supplicant.conf to boot partition!
SSH
To enable SSH-Server create an empty file /boot/ssh or /boot/ssh.txt
webcam
- https://tutorials-raspberrypi.de/raspberry-pi-ueberwachungskamera-livestream-einrichten/
- https://siytek.com/raspberry-pi-rtsp-to-home-assistant/
- https://www.raspberrypi-spy.co.uk/2017/04/detection-area-masking-in-motioneyeos-raspberry-pi/
moisture sensor
- https://tutorials-raspberrypi.de/raspberry-pi-giessomat-kapazitiver-erdfeuchtigkeitssensor/
- https://how2electronics.com/interface-capacitive-soil-moisture-sensor-arduino/
- https://maker.pro/raspberry-pi/tutorial/interfacing-soil-moisture-sensor-with-raspberry-pi
Problem: kein analoger GPIO
- normalerweise wird ein MCP3008 Wandler benötigt
- https://iot4beginners.com/analog-inputs-for-raspberry-pi-using-the-mcp3008/
- Es geht aber auch via RC Schaltung:
- https://www.raspberrypi-spy.co.uk/2012/08/reading-analogue-sensors-with-one-gpio-pin/
- https://www.gadgetexplained.com/2016/05/4-ways-to-get-raspberry-pi-to-read.html