Download an OS from https://www.raspberrypi.org/software/operating-systems/#raspberry-pi-os-32-bit
2018-06-27-raspbian-stretch-lite.zip
NOTE: No need to extract the .img - Etcher will read the .zip just fine
Flash using Etcher, use a USB->microSD Card reader:
https://github.com/balena-io/etcher
new-item -ItemType File -Name ssh -Path e:\
$config = @"
country=AU
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="GlobalEliteHackingCrew"
psk="password"
key_mgmt=WPA-PSK
}
"@
$config | out-file E:\wpa_supplicant.conf
OS install done
Fire up the pi ๐
Find the pi on the network - use Fing for Android/iOS
ssh pi@ipaddress
password: raspberry
sudo raspi-config nonint do_wifi_country AU
sudo hostnamectl set-hostname my-raspberry-pi
Sudo raspi-config
3, interface options
sudo raspi-config
raspistill -o image.jpg
sudo apt-get update -y && sudo apt-get dist-upgrade -y
sudo apt-get install git -y
git clone https://github.com/silvanmelchior/RPi_Cam_Web_Interface.git
sudo ./RPi_Cam_Web_Interface/install.sh
sudo reboot
http://elinux.org/RPi-Cam-Web-Interface
- WEB INTERFACE
Camera > Motion Detection: internal
Camera > Buffer: 4000
Camera > Preview Quality: 15
Quality is the jpeg compression factor (0-100). Lower numbers give better compression at the expense of quality. It is set to 25 by default which gives pretty good compression and not too much degradation. You can try lowering it to say 15 which will significantly lower sizes further but you will start to see some degradation. Lower than this it will start to get bad.
Divider is the rate at which new data is fetched. It is the video fps (default 25) divided by 'Divider'. Nominally that would mean it is trying to update at 25fps but in practice other delays lower this a bit. Increasing the divider lowers the fetch frame rate so 3 would give a nominal rate of 8fps. This will also have a dramatic effect on bandwidth.
- Custom annotation
%h:%m:%s %a
Use %a
, this references /dev/shm/mjpeg/user_annotate.txt
Use a cron job to update this file automatically (eg for day of week):
sudo crontab -e
* * * * * date +"\%a \%d \%b \%Y" > /dev/shm/mjpeg/user_annotate.txt
sudo nano /var/www/html/config.php
define('CAM_STRING',"pi-camera");
sudo nano /var/www/html/macros/motion_event.sh
sudo "#!/bin/bash" >> /var/www/html/macros/motion_event.sh
Replace Xs with your pushbullet API key
#!/bin/bash
curl -u XXXXXXXXXXXXXXXXXXXXXXXXX: https://api.pushbullet.com/v2/pushes -d type=note -d title="ALERT" -d body='Motion detected!'
sudo chown www-data:www-data /var/www/html/macros/motion_event.sh
sudo chmod 764 /var/www/html/macros/motion_event.sh
video_buffer in ms
sudo nano /etc/raspimjpeg
- Upload a favicon.ico to HOME
sudo cp ~/favicon.ico /var/www/
Note: need to do this interactively unless you're root Add:
disable_camera_led=1
to:
/boot/config.txt
System > Style > Night > OK
sudo nano /etc/pihole/pihole-FTL.conf
AAAA_QUERY_ANALYSIS=no
ANALYZE_ONLY_A_AND_AAAA=true
/etc/pihole/adlists.list
pihole -a -p
curl -sSL https://install.pi-hole.net | bash
tail -f /var/log/pihole.log
tail -f /var/log/pihole.log | grep 0.0.0.0
*improved version:
tail -f /var/log/pihole.log | cut -c 31-100 | grep 0.0.0.0
- Show last entries added to blocklist
tail /etc/pihole/black.list
sudo mv /var/www/html/admin/img/boxed-bg-dark.png /var/www/html/admin/img/boxed-bg-dark.png2
sudo nano /etc/hosts
sqlite3 /etc/pihole/pihole-FTL.db "SELECT domain FROM queries WHERE timestamp>='$(($(date +%s) - 86400))'" | sort | uniq -c | sort -n -r | head -50
sqlite3 /etc/pihole/pihole-FTL.db "SELECT domain FROM queries WHERE client='192.168.1.1' AND (STATUS == 1 OR STATUS == 4 OR STATUS == 5 OR STATUS == 9 OR STATUS == 10 OR STATUS == 11) AND timestamp>='$(($(date +%s) - 80000))'" | sort | uniq
sqlite3 "/etc/pihole/pihole-FTL.db" "SELECT domain,count(domain) FROM queries WHERE (STATUS == 2 OR STATUS == 3) GROUP BY domain ORDER BY count(domain) DESC LIMIT 3"
sqlite3 /etc/pihole/pihole-FTL.db "SELECT domain FROM queries WHERE client='192.168.1.12' AND timestamp>='$(($(date +%s) - 86400))'" | sort | uniq -c | sort -n -r | head -10
sudo nano /var/www/html/admin/scripts/pi-hole/js/queries.js
First value is the default the page loads with. Modify both the first and the 2nd array (eg 60):
Happy wife, happy life
sudo update-locale LC_ALL="en_GB.UTF8"
sudo update-locale LANGUAGE="en_GB:en"
sudo apt-get install git lsb-release -y
sudo apt-get update
sudo apt-get -f install
sudo apt-get dist-upgrade
git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git
cd RetroPie-Setup
chmod +x retropie_setup.sh
sudo ./retropie_setup.sh
Download the img
Stretch the aspect ratio
- comes in transistor or waterproof probe form
- is a digital probe
- -55ยฐC to 125ยฐC range
- 3.0V to 5.0V operating voltage
sudo raspi-config
DS18B20 Wiring: Red = VCC, Yellow = Data, Black = GND
cat /sys/bus/w1/devices/28*/w1_slave | grep t | cut -d= -f2
https://www.rototron.info/raspberry-pi-stepper-motor-tutorial/
https://thinkingofpi.com/getting-started/raspberry-pi-stepper-motor/
import RPi.GPIO as GPIO
import time
#print("doing stuff")
servoPIN = 17
GPIO.setmode(GPIO.BCM)
GPIO.setup(servoPIN, GPIO.OUT)
p = GPIO.PWM(servoPIN, 50) # GPIO 17 for PWM with 50Hz
p.start(2.5) # clockwise
time.sleep(1) # run for x seconds
p.stop()
sudo apt install python3-gpiozero -y