Raspberry Pi Raspbian: Difference between revisions

From My Mnemonic Rhyme
Jump to navigation Jump to search
>Homaar
No edit summary
 
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

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

moisture sensor

Problem: kein analoger GPIO